Fix display of empty group updates
Group updates in which nothing change should still display 'Updated the group'. Previously they would display as empty message bubbles. Fixed by ensuring that the 'group_update' attribute is set on the model, even if it is an empty object. // FREEBIE
This commit is contained in:
parent
6e97f5ad00
commit
b2bed9c51c
1 changed files with 2 additions and 2 deletions
|
@ -266,7 +266,7 @@
|
|||
var now = new Date().getTime();
|
||||
var attributes = { type: 'private' };
|
||||
if (dataMessage.group) {
|
||||
var group_update = {};
|
||||
var group_update = null;
|
||||
attributes = {
|
||||
type: 'group',
|
||||
groupId: dataMessage.group.id,
|
||||
|
@ -294,7 +294,7 @@
|
|||
attributes.members = _.without(conversation.get('members'), source);
|
||||
}
|
||||
|
||||
if (_.keys(group_update).length > 0) {
|
||||
if (group_update !== null) {
|
||||
message.set({group_update: group_update});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue