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:
@@ -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});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user