FIX: hitting enter on Msgs not searching Msgs

This commit is contained in:
Sam 2015-08-17 09:10:21 +10:00
parent 90388aa18e
commit 6086b07324
1 changed files with 4 additions and 1 deletions

View File

@ -40,7 +40,10 @@ export default Em.Controller.extend({
let url = '/search?q=' + encodeURIComponent(this.get('term'));
const searchContext = this.get('searchContext');
if (this.get('searchContextEnabled') && searchContext) {
if (this.get('searchContextEnabled') &&
searchContext.id.toLowerCase() === this.get('currentUser.username_lower')) {
url += ' in:private';
} else {
url += encodeURIComponent(" " + searchContext.type + ":" + searchContext.id);
}