diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/user/messages-section/message-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/user/messages-section/message-section-link.js index d1a10fefb0a..a28cebdeb7b 100644 --- a/app/assets/javascripts/discourse/app/lib/sidebar/user/messages-section/message-section-link.js +++ b/app/assets/javascripts/discourse/app/lib/sidebar/user/messages-section/message-section-link.js @@ -73,10 +73,14 @@ export default class MessageSectionLink { } get prefixType() { - return "icon"; + if (this._isInbox) { + return "icon"; + } } get prefixValue() { - return "inbox"; + if (this._isInbox) { + return "inbox"; + } } } diff --git a/app/assets/javascripts/discourse/tests/acceptance/sidebar-user-messages-section-test.js b/app/assets/javascripts/discourse/tests/acceptance/sidebar-user-messages-section-test.js index c42ba0d83e2..f3ac3f2f4b5 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/sidebar-user-messages-section-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/sidebar-user-messages-section-test.js @@ -161,6 +161,13 @@ acceptance( ), `personal message ${type} link is marked as active` ); + + assert.notOk( + exists( + `.sidebar-section-messages .sidebar-section-link-personal-messages-${type} .sidebar-section-link-prefix` + ), + `prefix is not displayed for ${type} personal message section link` + ); }); });