Add null check for call span

This commit is contained in:
David Baker 2023-04-04 17:49:49 +01:00
parent 277081ee2a
commit 5b70def4d2

View file

@ -206,6 +206,10 @@ export class OTelGroupCallMembership {
if (!eventType.startsWith("m.call")) return;
const callTrackingInfo = this.callsByCallId.get(call.callId);
if (!callTrackingInfo) {
logger.error(`Got call send event for unknown call ID ${call.callId}`);
return;
}
if (event.type === "toDevice") {
callTrackingInfo.span.addEvent(