Don't pass null / undefined as attribute value

This commit is contained in:
David Baker 2023-04-03 17:41:40 +01:00
commit 30f75c6cd2
2 changed files with 3 additions and 2 deletions

View file

@ -171,7 +171,8 @@ export class OTelGroupCallMembership {
span.setAttribute("matrix.call.target.userId", userId);
span.setAttribute("matrix.call.target.deviceId", deviceId);
const displayName = this.groupCall.room.getMember(userId)?.name;
const displayName =
this.groupCall.room.getMember(userId)?.name ?? "unknown";
span.setAttribute("matrix.call.target.displayName", displayName);
this.callsByCallId.set(call.callId, {
userId,