@@ -184,6 +184,10 @@ export const ReactionsProvider = ({
184
184
// This effect handles any *live* reaction/redactions in the room.
185
185
useEffect ( ( ) => {
186
186
const reactionTimeouts = new Set < number > ( ) ;
187
+ // TODO: this should be somewhere more sensible
188
+ const handleTimelineReset = ( ) : void => {
189
+ logger . warn ( "Received TimelineReset indicating limited sync response" ) ;
190
+ } ;
187
191
const handleReactionEvent = ( event : MatrixEvent ) : void => {
188
192
// Decrypted events might come from a different room
189
193
if ( event . getRoomId ( ) !== room . roomId ) return ;
@@ -297,6 +301,7 @@ export const ReactionsProvider = ({
297
301
}
298
302
} ;
299
303
304
+ room . on ( MatrixRoomEvent . TimelineReset , handleTimelineReset ) ;
300
305
room . on ( MatrixRoomEvent . Timeline , handleReactionEvent ) ;
301
306
room . on ( MatrixRoomEvent . Redaction , handleReactionEvent ) ;
302
307
room . client . on ( MatrixEventEvent . Decrypted , handleReactionEvent ) ;
@@ -306,6 +311,7 @@ export const ReactionsProvider = ({
306
311
room . on ( MatrixRoomEvent . LocalEchoUpdated , handleReactionEvent ) ;
307
312
308
313
return ( ) : void => {
314
+ room . off ( MatrixRoomEvent . TimelineReset , handleTimelineReset ) ;
309
315
room . off ( MatrixRoomEvent . Timeline , handleReactionEvent ) ;
310
316
room . off ( MatrixRoomEvent . Redaction , handleReactionEvent ) ;
311
317
room . client . off ( MatrixEventEvent . Decrypted , handleReactionEvent ) ;
0 commit comments