Fix bug in message model
conversation.changedAttributes returns false when there are no changes.
This commit is contained in:
parent
3e73f8f0ba
commit
98a14e9a6a
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@
|
||||||
avatar : dataMessage.group.avatar,
|
avatar : dataMessage.group.avatar,
|
||||||
members : dataMessage.group.members,
|
members : dataMessage.group.members,
|
||||||
};
|
};
|
||||||
group_update = conversation.changedAttributes(_.pick(dataMessage.group, 'name', 'avatar'));
|
group_update = conversation.changedAttributes(_.pick(dataMessage.group, 'name', 'avatar')) || {};
|
||||||
var difference = _.difference(dataMessage.group.members, conversation.get('members'));
|
var difference = _.difference(dataMessage.group.members, conversation.get('members'));
|
||||||
if (difference.length > 0) {
|
if (difference.length > 0) {
|
||||||
group_update.joined = difference;
|
group_update.joined = difference;
|
||||||
|
|
Loading…
Reference in a new issue