You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Support m.call.select_answer
Only send one if the answer has a party_id set Also change some event types to the enum and rename receivedAnswer to be more consistent
This commit is contained in:
@@ -213,7 +213,7 @@ export class CallEventHandler {
|
||||
call.onAnsweredElsewhere(content);
|
||||
}
|
||||
} else {
|
||||
call.receivedAnswer(content);
|
||||
call.onAnswerReceived(event);
|
||||
}
|
||||
} else if (event.getType() === EventType.CallCandidates) {
|
||||
if (event.getSender() === this.client.credentials.userId) {
|
||||
@@ -251,6 +251,13 @@ export class CallEventHandler {
|
||||
this.calls.delete(content.call_id);
|
||||
}
|
||||
}
|
||||
} else if (event.getType() === EventType.CallSelectAnswer) {
|
||||
if (event.getContent().party_id === call.ourPartyId) {
|
||||
// Ignore remote echo
|
||||
return;
|
||||
}
|
||||
|
||||
call.onSelectAnswerReceived(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user