Fix incoming group messages appearing from the group

This commit is contained in:
Ken Powers 2020-04-13 14:49:10 -04:00 committed by GitHub
parent fb11ac50d2
commit 324472e431
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -242,7 +242,7 @@
// Older messages don't have the recipients included on the message, so we fall
// back to the conversation's current recipients
const conversationIds = this.isIncoming()
? [this.getConversation().get('id')]
? [this.getContact().get('id')]
: _.union(
(this.get('sent_to') || []).map(id =>
ConversationController.getConversationId(id)
@ -410,11 +410,11 @@
getPropsForSafetyNumberNotification() {
const conversation = this.getConversation();
const isGroup = conversation && !conversation.isPrivate();
const phoneNumber = this.get('key_changed');
const identifier = this.get('key_changed');
return {
isGroup,
contact: this.findAndFormatContact(phoneNumber),
contact: this.findAndFormatContact(identifier),
};
},
getPropsForVerificationNotification() {
@ -894,8 +894,8 @@
);
}
if (this.isKeyChange()) {
const phoneNumber = this.get('key_changed');
const conversation = this.findContact(phoneNumber);
const identifier = this.get('key_changed');
const conversation = this.findContact(identifier);
return i18n(
'safetyNumberChangedGroup',
conversation ? conversation.getTitle() : null