From 056c79a9083f293644623fa27b997a365b3cde0c Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Fri, 5 Nov 2021 20:04:20 +0100 Subject: [PATCH] fix: Cannot reply to posts by deleted authors (#75) --- extensions/mentions/js/src/forum/utils/getCleanDisplayName.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/mentions/js/src/forum/utils/getCleanDisplayName.js b/extensions/mentions/js/src/forum/utils/getCleanDisplayName.js index 1c620370c..6165f72a2 100644 --- a/extensions/mentions/js/src/forum/utils/getCleanDisplayName.js +++ b/extensions/mentions/js/src/forum/utils/getCleanDisplayName.js @@ -1,3 +1,5 @@ +import extractText from 'flarum/common/utils/extractText'; + /** * Whether to use the old mentions format. * @@ -5,7 +7,7 @@ */ export const shouldUseOldFormat = () => app.forum.attribute('allowUsernameMentionFormat') || false; -const getDeletedUserText = () => app.translator.trans('core.lib.username.deleted_text'); +const getDeletedUserText = () => extractText(app.translator.trans('core.lib.username.deleted_text')); /** * Fetches a user's username or display name.