Fixes several bugs
This commit is contained in:
parent
7eabdffcd0
commit
57308d3104
11 changed files with 164 additions and 84 deletions
|
@ -459,6 +459,10 @@
|
|||
});
|
||||
}
|
||||
|
||||
const placeholderContact = {
|
||||
title: i18n('unknownContact'),
|
||||
};
|
||||
|
||||
if (groupUpdate.joined) {
|
||||
changes.push({
|
||||
type: 'add',
|
||||
|
@ -466,7 +470,8 @@
|
|||
Array.isArray(groupUpdate.joined)
|
||||
? groupUpdate.joined
|
||||
: [groupUpdate.joined],
|
||||
identifier => this.findAndFormatContact(identifier)
|
||||
identifier =>
|
||||
this.findAndFormatContact(identifier) || placeholderContact
|
||||
),
|
||||
});
|
||||
}
|
||||
|
@ -483,7 +488,8 @@
|
|||
Array.isArray(groupUpdate.left)
|
||||
? groupUpdate.left
|
||||
: [groupUpdate.left],
|
||||
identifier => this.findAndFormatContact(identifier)
|
||||
identifier =>
|
||||
this.findAndFormatContact(identifier) || placeholderContact
|
||||
),
|
||||
});
|
||||
}
|
||||
|
@ -2451,7 +2457,12 @@
|
|||
conversation.get('members')
|
||||
);
|
||||
if (difference.length > 0) {
|
||||
pendingGroupUpdate.push(['joined', difference]);
|
||||
// Because GroupV1 groups are based on e164 only
|
||||
const e164s = difference.map(id => {
|
||||
const c = ConversationController.get(id);
|
||||
return c ? c.get('e164') : null;
|
||||
});
|
||||
pendingGroupUpdate.push(['joined', e164s]);
|
||||
}
|
||||
if (conversation.get('left')) {
|
||||
window.log.warn('re-added to a left group');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue