mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-18 12:17:03 +02:00
Fix sending call notify (#12211)
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
parent
5ffb921b1f
commit
53b3d6fe98
@ -850,13 +850,17 @@ export class ElementCall extends Call {
|
|||||||
|
|
||||||
protected async sendCallNotify(): Promise<void> {
|
protected async sendCallNotify(): Promise<void> {
|
||||||
const room = this.room;
|
const room = this.room;
|
||||||
const existingRoomCallMembers = MatrixRTCSession.callMembershipsForRoom(room).filter(
|
const existingOtherRoomCallMembers = MatrixRTCSession.callMembershipsForRoom(room).filter(
|
||||||
// filter all memberships where the application is m.call and the call_id is ""
|
// filter all memberships where the application is m.call and the call_id is ""
|
||||||
(m) => m.application === "m.call" && m.callId === "",
|
(m) => {
|
||||||
|
const isRoomCallMember = m.application === "m.call" && m.callId === "";
|
||||||
|
const isThisDevice = m.deviceId === this.client.deviceId;
|
||||||
|
return isRoomCallMember && !isThisDevice;
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const memberCount = getJoinedNonFunctionalMembers(room).length;
|
const memberCount = getJoinedNonFunctionalMembers(room).length;
|
||||||
if (!isVideoRoom(room) && existingRoomCallMembers.length == 0) {
|
if (!isVideoRoom(room) && existingOtherRoomCallMembers.length === 0) {
|
||||||
// send ringing event
|
// send ringing event
|
||||||
const content: ICallNotifyContent = {
|
const content: ICallNotifyContent = {
|
||||||
"application": "m.call",
|
"application": "m.call",
|
||||||
|
Loading…
Reference in New Issue
Block a user