Merge branch 'bwindels/calls' into thirdroom/dev

This commit is contained in:
Robert Long 2022-04-20 08:22:58 -07:00
commit fdd067038d

View File

@ -326,16 +326,12 @@ export class GroupCall extends EventEmitter<{change: never}> {
}; };
callsInfo.push(callInfo); callsInfo.push(callInfo);
} }
const devicesInfo = callInfo["m.devices"]; callInfo["m.devices"] = callInfo["m.devices"].filter(d => d["device_id"] !== this.options.ownDeviceId);
let deviceInfo = devicesInfo.find(d => d["device_id"] === this.options.ownDeviceId); callInfo["m.devices"].push({
if (!deviceInfo) {
deviceInfo = {
["device_id"]: this.options.ownDeviceId, ["device_id"]: this.options.ownDeviceId,
["session_id"]: this.options.sessionId, ["session_id"]: this.options.sessionId,
feeds: [{purpose: "m.usermedia"}] feeds: [{purpose: "m.usermedia"}]
}; });
devicesInfo.push(deviceInfo);
}
return stateContent; return stateContent;
} }