Skip to content

A platform for community discussion. Free, open, simple.

FIX: Don't link icon to the private messages page if they are disabled

Robin Ward1e77850dff3c
diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs
index 5bdaca85fbe..b8ffe6b5e96 100644
--- a/app/assets/javascripts/discourse/templates/topic.hbs
+++ b/app/assets/javascripts/discourse/templates/topic.hbs
@@ -42,9 +42,13 @@
{{else}}
<h1>
{{#unless model.is_warning}}
- <a href={{pmPath}}>
+ {{#if siteSettings.enable_private_messages}}
+ <a href={{pmPath}}>
+ <span class="private-message-glyph">{{d-icon "envelope"}}</span>
+ </a>
+ {{else}}
<span class="private-message-glyph">{{d-icon "envelope"}}</span>
- </a>
+ {{/if}}
{{/unless}}
{{#if model.details.loaded}}