Skip to content

Commit 7d657ee

Browse files
germain-ggskyka13711
authored andcommitted
Emit thread update after event decryption (matrix-org#2040)
1 parent 00779c8 commit 7d657ee

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/models/thread.ts

-13
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ export class Thread extends TypedEventEmitter<ThreadEvent> {
107107
this._currentUserParticipated = true;
108108
}
109109

110-
if (this.ready) {
111-
this.client.decryptEventIfNeeded(event, {});
112-
}
113-
114110
await this.client.decryptEventIfNeeded(event, {});
115111
this.emit(ThreadEvent.Update, this);
116112
}
@@ -131,15 +127,6 @@ export class Thread extends TypedEventEmitter<ThreadEvent> {
131127
return threadReplies[threadReplies.length - 1];
132128
}
133129

134-
/**
135-
* Determines thread's ready status
136-
*/
137-
public get lastReply(): MatrixEvent {
138-
const threadReplies = this.events
139-
.filter(event => event.isThreadRelation);
140-
return threadReplies[threadReplies.length - 1];
141-
}
142-
143130
/**
144131
* The thread ID, which is the same as the root event ID
145132
*/

0 commit comments

Comments
 (0)