Fix suspended notification not showing correct suspension length (#32)

This commit is contained in:
David Sevilla Martín 2021-01-24 01:42:52 -05:00 committed by GitHub
parent 064d1f5eb6
commit 1c6b8c67a7

View File

@ -12,7 +12,7 @@ export default class UserSuspendedNotification extends Notification {
content() {
const notification = this.attrs.notification;
const suspendedUntil = notification.content();
const timeReadable = dayjs(suspendedUntil.date).from(notification.createdAt(), true);
const timeReadable = dayjs(suspendedUntil).from(notification.createdAt(), true);
return app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {
user: notification.fromUser(),