diff --git a/app/assets/javascripts/discourse/components/composer-messages.js.es6 b/app/assets/javascripts/discourse/components/composer-messages.js.es6 index ce933a5f8..2933bdae7 100644 --- a/app/assets/javascripts/discourse/components/composer-messages.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-messages.js.es6 @@ -91,19 +91,6 @@ export default Ember.Component.extend({ this.send('popup', Ember.Object.create(info)); }, - groupsMentioned(groups) { - // reset existing messages, this should always win it is critical - this.reset(); - groups.forEach(group => { - const body = I18n.t('composer.group_mentioned', { - group: "@" + group.name, - count: group.user_count, - group_link: Discourse.getURL(`/group/${group.name}/members`) - }); - this.send("popup", Ember.Object.create({ templateName: 'custom-body', body })); - }); - }, - _findSimilar() { const composer = this.get('composer'); diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index a4ececaa9..5b7e08875 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -230,7 +230,18 @@ export default Ember.Controller.extend({ groupsMentioned(groups) { if (!this.get('model.creatingPrivateMessage') && !this.get('model.topic.isPrivateMessage')) { - this.get('controllers.composer-messages').groupsMentioned(groups); + groups.forEach(group => { + const body = I18n.t('composer.group_mentioned', { + group: "@" + group.name, + count: group.user_count, + group_link: Discourse.getURL(`/group/${group.name}/members`) + }); + this.appEvents.trigger('composer-messages:create', { + extraClass: 'custom-body', + templateName: 'custom-body', + body + }); + }); } }