diff --git a/app/assets/javascripts/discourse/routes/user-private-messages-group.js.es6 b/app/assets/javascripts/discourse/routes/user-private-messages-group.js.es6 index ded798bb2d6..0b7f923f208 100644 --- a/app/assets/javascripts/discourse/routes/user-private-messages-group.js.es6 +++ b/app/assets/javascripts/discourse/routes/user-private-messages-group.js.es6 @@ -8,6 +8,13 @@ export default createPMRoute('groups', 'private-messages-groups').extend({ }); }, + afterModel(model) { + const groupName = _.last(model.get("filter").split('/')); + const groups = this.modelFor("user").get("groups"); + const group = _.first(groups.filterBy("name", groupName)); + this.controllerFor("user-private-messages").set("group", group); + }, + setupController(controller, model) { this._super.apply(this, arguments); const group = _.last(model.get("filter").split('/'));