mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Add excerpt for user mentioned notification
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import Notification from 'flarum/components/Notification';
|
||||
import username from 'flarum/helpers/username';
|
||||
import punctuate from 'flarum/helpers/punctuate';
|
||||
import { truncate } from 'flarum/utils/string';
|
||||
|
||||
export default class PostMentionedNotification extends Notification {
|
||||
icon() {
|
||||
@@ -32,6 +31,6 @@ export default class PostMentionedNotification extends Notification {
|
||||
}
|
||||
|
||||
excerpt() {
|
||||
return truncate(this.props.notification.subject().contentPlain(), 100);
|
||||
return this.props.notification.subject().contentPlain();
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import Notification from 'flarum/components/Notification';
|
||||
import username from 'flarum/helpers/username';
|
||||
|
||||
export default class UserMentionedNotification extends Notification {
|
||||
icon() {
|
||||
@@ -17,4 +16,8 @@ export default class UserMentionedNotification extends Notification {
|
||||
|
||||
return app.trans('mentions.user_mentioned_notification', {user});
|
||||
}
|
||||
|
||||
excerpt() {
|
||||
return this.props.notification.subject().contentPlain();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user