FIX: link to pm tags when searching in personal messages

This commit is contained in:
Arpit Jalan 2018-05-29 12:30:23 +05:30
parent df815d6c0e
commit 277e216d25
2 changed files with 6 additions and 1 deletions

View File

@ -146,6 +146,11 @@ export default Ember.Controller.extend({
}
},
@computed('q')
isPrivateMessage(q) {
return q && this.currentUser && (q.indexOf("in:private") > -1 || q.indexOf(`private_messages:${this.currentUser.get('username_lower')}`) > -1);
},
@observes('loading')
_showFooter() {
this.set("application.showFooter", !this.get("loading"));

View File

@ -85,7 +85,7 @@
{{/if}}
{{category-link result.topic.category hideParent=true}}
{{#each result.topic.tags as |tag|}}
{{discourse-tag tag}}
{{discourse-tag tag isPrivateMessage=isPrivateMessage}}
{{/each}}
{{plugin-outlet name="full-page-search-category" args=(hash result=result)}}
</div>