File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,16 @@ export class Thread extends ReadReceipt<EmittedEvents, EventHandlerMap> {
203203 ) : void => {
204204 // Add a synthesized receipt when paginating forward in the timeline
205205 if ( ! toStartOfTimeline ) {
206- room ! . addLocalEchoReceipt ( event . getSender ( ) ! , event , ReceiptType . Read ) ;
206+ const sender = event . getSender ( ) ;
207+ if ( sender ) {
208+ const existingReceipt = this . getReadReceiptForUserId ( sender ) ;
209+ const existingTimespace = existingReceipt ?. data ?. ts ?? 0 ;
210+ const recursionSupport =
211+ this . client . canSupport . get ( Feature . RelationsRecursion ) ?? ServerSupport . Unsupported ;
212+ if ( recursionSupport === ServerSupport . Unsupported && existingTimespace < event . getTs ( ) ) {
213+ room ! . addLocalEchoReceipt ( event . getSender ( ) ! , event , ReceiptType . Read ) ;
214+ }
215+ }
207216 }
208217 this . onEcho ( event , toStartOfTimeline ?? false ) ;
209218 } ;
You can’t perform that action at this time.
0 commit comments