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
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
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
*/