1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

MatrixEvent.getRoomId can return undefined (#2036)

This commit is contained in:
Christian Paul
2022-02-02 16:22:57 +01:00
committed by GitHub
parent 82122872bf
commit 34a3955b60

View File

@@ -437,10 +437,10 @@ export class MatrixEvent extends EventEmitter {
/**
* Get the room_id for this event. This will return <code>undefined</code>
* for <code>m.presence</code> events.
* @return {string} The room ID, e.g. <code>!cURbafjkfsMDVwdRDQ:matrix.org
* @return {string?} The room ID, e.g. <code>!cURbafjkfsMDVwdRDQ:matrix.org
* </code>
*/
public getRoomId(): string {
public getRoomId(): string | undefined {
return this.event.room_id;
}