1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Support hangup reasons

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-06-01 14:46:41 +02:00
parent 2a22f03a6a
commit 70a5715b3d
3 changed files with 87 additions and 25 deletions

View File

@@ -82,6 +82,10 @@ export default class CallEventGrouper extends EventEmitter {
return this.state;
}
public getHangupReason(): string | null {
return this.events.find((event) => event.getType() === EventType.CallHangup)?.getContent()?.reason;
}
/**
* Returns true if there are only events from the other side - we missed the call
*/