mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: Broken group warning
This commit is contained in:
parent
431179dd25
commit
dbdcd0ca0f
2 changed files with 12 additions and 14 deletions
|
@ -91,19 +91,6 @@ export default Ember.Component.extend({
|
||||||
this.send('popup', Ember.Object.create(info));
|
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() {
|
_findSimilar() {
|
||||||
const composer = this.get('composer');
|
const composer = this.get('composer');
|
||||||
|
|
||||||
|
|
|
@ -230,7 +230,18 @@ export default Ember.Controller.extend({
|
||||||
|
|
||||||
groupsMentioned(groups) {
|
groupsMentioned(groups) {
|
||||||
if (!this.get('model.creatingPrivateMessage') && !this.get('model.topic.isPrivateMessage')) {
|
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
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue