Fix rendering of group joins and remove checkServiceIdEquivalence

This commit is contained in:
Scott Nonnenberg 2024-05-03 07:28:36 -07:00 committed by GitHub
parent 214fae0c6e
commit a1f0afdae8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 108 additions and 65 deletions

View file

@ -1253,7 +1253,13 @@ export class BackupExportStream extends Readable {
update.groupMemberAddedUpdate = innerUpdate;
updates.push(update);
} else if (type === 'member-add-from-invite') {
if (from && checkServiceIdEquivalence(from, detail.aci)) {
const { aci, pni } = detail;
if (
from &&
((pni && from === pni) ||
(aci && from === aci) ||
checkServiceIdEquivalence(from, aci))
) {
const innerUpdate = new Backups.GroupInvitationAcceptedUpdate();
innerUpdate.newMemberAci = this.aciToBytes(detail.aci);
if (detail.inviter) {