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

@ -709,7 +709,40 @@ describe('backup/groupv2/notifications', () => {
},
],
}),
// ACI accepts PNI invite:
// ACI accepts PNI invite (X joined the group)
// These don't roundtrip; the PNI from is replaced with ACI. See next test below.
// createMessage({
// from: OUR_PNI,
// details: [
// {
// type: 'member-add-from-invite',
// aci: OUR_ACI,
// pni: OUR_PNI,
// inviter: CONTACT_B,
// },
// ],
// }),
// createMessage({
// from: OUR_PNI,
// details: [
// {
// type: 'member-add-from-invite',
// aci: OUR_ACI,
// pni: OUR_PNI,
// },
// ],
// }),
// createMessage({
// from: CONTACT_A_PNI,
// details: [
// {
// type: 'member-add-from-invite',
// aci: CONTACT_A,
// pni: CONTACT_A_PNI,
// },
// ],
// }),
// ACI accepts PNI invite, the old way (X added X to group)
// These don't roundtrip; the PNI is replaced with ACI. See next test below.
// createMessage({
// from: OUR_PNI,
@ -813,8 +846,31 @@ describe('backup/groupv2/notifications', () => {
{ disableIncrement: true }
);
const before = [firstBefore, secondBefore, thirdBefore];
const after = [firstAfter, secondAfter, thirdAfter];
const fourthBefore = createMessage({
from: CONTACT_A_PNI,
details: [
{
type: 'member-add-from-invite',
aci: CONTACT_A,
pni: CONTACT_A_PNI,
},
],
});
const fourthAfter = createMessage(
{
from: CONTACT_A,
details: [
{
type: 'member-add-from-invite',
aci: CONTACT_A,
},
],
},
{ disableIncrement: true }
);
const before = [firstBefore, secondBefore, thirdBefore, fourthBefore];
const after = [firstAfter, secondAfter, thirdAfter, fourthAfter];
await asymmetricRoundtripHarness(before, after);
});