1
0
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:
Toby Zerner
2015-08-21 10:03:59 +09:30
parent 1930fcdd92
commit 413f2e4825
2 changed files with 5 additions and 3 deletions

View File

@@ -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();
}
}

View File

@@ -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();
}
}