correct logic

This commit is contained in:
Sam 2015-08-17 11:54:42 +10:00
parent 6dc8dda7b6
commit b4d7ff1dac

View File

@ -41,7 +41,9 @@ export default Em.Controller.extend({
const searchContext = this.get('searchContext');
if (this.get('searchContextEnabled')) {
if (searchContext.id.toLowerCase() === this.get('currentUser.username_lower')) {
if (searchContext.id.toLowerCase() === this.get('currentUser.username_lower') &&
searchContext.type === "private_messages"
) {
url += ' in:private';
} else {
url += encodeURIComponent(" " + searchContext.type + ":" + searchContext.id);