Make event listener more resillient.

This commit is contained in:
Will Hunt
2024-11-04 12:12:37 +00:00
parent 844379aa7d
commit d251af4e6d

View File

@@ -197,10 +197,9 @@ export const ReactionsProvider = ({
}
if (event.getType() === ElementCallReactionEventType) {
// TODO: Validate content.
const content: ECallReactionEventContent = event.getContent();
const membershipEventId = content["m.relates_to"].event_id;
const membershipEventId = content?.["m.relates_to"]?.event_id;
// Check to see if this reaction was made to a membership event (and the
// sender of the reaction matches the membership)
if (