FIX: Hide suggestion to send PMs when PMs are disabled for user (#26157)

This commit is contained in:
Jan Cernik 2024-03-13 16:29:22 -03:00 committed by GitHub
parent 551c6022dc
commit 2d074ad4a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 6 deletions

View File

@ -107,12 +107,14 @@ export default (inboxType, path, filter) => {
emptyState() {
const title = I18n.t("user.no_messages_title");
const body = htmlSafe(
I18n.t("user.no_messages_body", {
aboutUrl: getURL("/about"),
icon: iconHTML("envelope"),
})
);
const body = this.currentUser?.can_send_private_messages
? htmlSafe(
I18n.t("user.no_messages_body", {
aboutUrl: getURL("/about"),
icon: iconHTML("envelope"),
})
)
: "";
return { title, body };
},