mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-08-13 17:03:51 -04:00
Display every nickname notification
This commit is contained in:
parent
9c501c7a54
commit
9e4e35d297
@ -101,20 +101,21 @@ module.exports = HumanModel.define({
|
|||||||
addMessage: function (message, notify) {
|
addMessage: function (message, notify) {
|
||||||
message.owner = me.jid.bare;
|
message.owner = me.jid.bare;
|
||||||
|
|
||||||
var mine = message.from.resource === this.nick;
|
|
||||||
|
|
||||||
if (mine) {
|
|
||||||
message._mucMine = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
var mentions = [];
|
var mentions = [];
|
||||||
if (message.body.toLowerCase().indexOf('@' + this.nick.toLowerCase()) >= 0) {
|
this.resources.forEach(function (resource) {
|
||||||
mentions.push('@' + this.nick);
|
if (message.body.toLowerCase().indexOf('@' + resource.mucDisplayName) >= 0) {
|
||||||
|
mentions.push('@' + resource.mucDisplayName);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
if (message.body.toLowerCase().indexOf('@all') >= 0) {
|
if (message.body.toLowerCase().indexOf('@all') >= 0) {
|
||||||
mentions.push('@all');
|
mentions.push('@all');
|
||||||
}
|
}
|
||||||
message.mentions = mentions;
|
message.mentions = mentions;
|
||||||
|
|
||||||
|
var mine = message.from.resource === this.nick;
|
||||||
|
|
||||||
|
if (mine) {
|
||||||
|
message._mucMine = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notify && (!this.activeContact || (this.activeContact && !app.state.focused)) && !mine) {
|
if (notify && (!this.activeContact || (this.activeContact && !app.state.focused)) && !mine) {
|
||||||
|
Loading…
Reference in New Issue
Block a user