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
Switch callEventHandler from listening on event to Room.timeline
so that it doesn't end up processing ephemerals, account data, remote echoes, etc etc
This commit is contained in:
@@ -47,12 +47,12 @@ export class CallEventHandler {
|
||||
|
||||
public start() {
|
||||
this.client.on("sync", this.evaluateEventBuffer);
|
||||
this.client.on("event", this.onEvent);
|
||||
this.client.on("Room.timeline", this.onRoomTimeline);
|
||||
}
|
||||
|
||||
public stop() {
|
||||
this.client.removeListener("sync", this.evaluateEventBuffer);
|
||||
this.client.removeListener("event", this.onEvent);
|
||||
this.client.removeListener("Room.timeline", this.onRoomTimeline);
|
||||
}
|
||||
|
||||
private evaluateEventBuffer = async () => {
|
||||
@@ -89,7 +89,7 @@ export class CallEventHandler {
|
||||
}
|
||||
};
|
||||
|
||||
private onEvent = (event: MatrixEvent) => {
|
||||
private onRoomTimeline = (event: MatrixEvent) => {
|
||||
this.client.decryptEventIfNeeded(event);
|
||||
// any call events or ones that might be once they're decrypted
|
||||
if (this.eventIsACall(event) || event.isBeingDecrypted()) {
|
||||
|
||||
Reference in New Issue
Block a user