Don't load PM icon in title unless topic is a PM

Don’t load PM icon in title unless topic is a PM

diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs
index 1673cb3..0c32010 100644
--- a/app/assets/javascripts/discourse/templates/topic.hbs
+++ b/app/assets/javascripts/discourse/templates/topic.hbs
@@ -53,11 +53,15 @@
             <h1 data-topic-id="{{unbound model.id}}">
               {{#unless model.is_warning}}
                 {{#if siteSettings.enable_personal_messages}}
-                  <a href={{pmPath}}>
-                    <span class="private-message-glyph">{{d-icon "envelope"}}</span>
-                  </a>
+                  {{#if model.isPrivateMessage}}
+                    <a href={{pmPath}}>
+                      <span class="private-message-glyph">{{d-icon "envelope"}}</span>
+                    </a>
+                  {{/if}}
                 {{else}}
-                  <span class="private-message-glyph">{{d-icon "envelope"}}</span>
+                  {{#if model.isPrivateMessage}}
+                    <span class="private-message-glyph">{{d-icon "envelope"}}</span>
+                  {{/if}}
                 {{/if}}
               {{/unless}}

GitHub sha: 1983f0d0

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: