You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-04 05:02:41 +03:00
Don't decrement the length count of a thread when root redacted (#2314)
This commit is contained in:
committed by
GitHub
parent
c0cb66233a
commit
e133005b44
@@ -119,6 +119,7 @@ export class Thread extends TypedEventEmitter<EmittedEvents, EventHandlerMap> {
|
||||
private onBeforeRedaction = (event: MatrixEvent, redaction: MatrixEvent) => {
|
||||
if (event?.isRelation(THREAD_RELATION_TYPE.name) &&
|
||||
this.room.eventShouldLiveIn(event).threadId === this.id &&
|
||||
event.getId() !== this.id && // the root event isn't counted in the length so ignore this redaction
|
||||
!redaction.status // only respect it when it succeeds
|
||||
) {
|
||||
this.replyCount--;
|
||||
|
||||
Reference in New Issue
Block a user