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
pull/749/head
lilia 9 years ago
parent 6e97f5ad00
commit b2bed9c51c

@ -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…
Cancel
Save