From 6086b07324d02f5d31a498790cf51cd081dbb74c Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 17 Aug 2015 09:10:21 +1000 Subject: [PATCH] FIX: hitting enter on Msgs not searching Msgs --- app/assets/javascripts/discourse/controllers/search.js.es6 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/search.js.es6 b/app/assets/javascripts/discourse/controllers/search.js.es6 index 5f814e99f9d..25930fe4e83 100644 --- a/app/assets/javascripts/discourse/controllers/search.js.es6 +++ b/app/assets/javascripts/discourse/controllers/search.js.es6 @@ -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); }