This commit is contained in:
Bruno Windels 2021-06-17 10:12:45 +02:00
parent cbee498d41
commit a77ef02677

View file

@ -212,17 +212,13 @@ export class Timeline {
// this will work because we set relatedEventId when removing remote echos // this will work because we set relatedEventId when removing remote echos
if (pee.relatedEventId) { if (pee.relatedEventId) {
const relationTarget = entries.find(e => e.id === pee.relatedEventId); const relationTarget = entries.find(e => e.id === pee.relatedEventId);
if (relationTarget) { // no need to emit here as this entry is about to be added
// no need to emit here as this entry is about to be added relationTarget?.addLocalRelation(pee);
relationTarget.addLocalRelation(pee);
}
} }
if (pee.redactingEntry) { if (pee.redactingEntry) {
const eventId = pee.redactingEntry.relatedEventId; const eventId = pee.redactingEntry.relatedEventId;
const relationTarget = entries.find(e => e.id === eventId); const relationTarget = entries.find(e => e.id === eventId);
if (relationTarget) { relationTarget?.addLocalRelation(pee);
relationTarget.addLocalRelation(pee);
}
} }
} }
} }