fix group update message for medium group 'You' left or kicked

pull/1387/head
Audric Ackermann 4 years ago
parent dad9e5297c
commit 325331550c
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -462,15 +462,26 @@
isMe: true, isMe: true,
}); });
} else if (groupUpdate.left) { } else if (groupUpdate.left) {
changes.push({ if (
type: 'remove', Array.isArray(groupUpdate.left) &&
contacts: _.map( groupUpdate.left.length === 1 &&
Array.isArray(groupUpdate.left) groupUpdate.left[0] === textsecure.storage.user.getNumber()
? groupUpdate.left ) {
: [groupUpdate.left], changes.push({
phoneNumber => this.findAndFormatContact(phoneNumber) type: 'remove',
), isMe: true,
}); });
} else {
changes.push({
type: 'remove',
contacts: _.map(
Array.isArray(groupUpdate.left)
? groupUpdate.left
: [groupUpdate.left],
phoneNumber => this.findAndFormatContact(phoneNumber)
),
});
}
} }
if (groupUpdate.name) { if (groupUpdate.name) {

Loading…
Cancel
Save