diff --git a/app/assets/javascripts/discourse/routes/build-private-messages-route.js.es6 b/app/assets/javascripts/discourse/routes/build-private-messages-route.js.es6 index 63fa6d56e8a..b20e9e1b3dc 100644 --- a/app/assets/javascripts/discourse/routes/build-private-messages-route.js.es6 +++ b/app/assets/javascripts/discourse/routes/build-private-messages-route.js.es6 @@ -32,7 +32,10 @@ export default (viewName, path) => { }, deactivate() { - this.searchService.set('contextType', 'private_messages'); + this.searchService.set( + 'searchContext', + this.controllerFor("user").get("model.searchContext") + ); } }); };