1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-04 05:02:41 +03:00

Threads notifications after app startup (#2043)

This commit is contained in:
Germain
2021-12-07 10:58:34 +00:00
committed by GitHub
parent 39a8399977
commit 2206b80e65
3 changed files with 29 additions and 19 deletions

View File

@@ -25,6 +25,8 @@ export enum ThreadEvent {
New = "Thread.new",
Ready = "Thread.ready",
Update = "Thread.update",
NewReply = "Thread.newReply",
ViewThread = "Thred.viewThread",
}
/**
@@ -109,6 +111,10 @@ export class Thread extends TypedEventEmitter<ThreadEvent> {
await this.client.decryptEventIfNeeded(event, {});
this.emit(ThreadEvent.Update, this);
if (event.isThreadRelation) {
this.emit(ThreadEvent.NewReply, this, event);
}
}
/**