mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Fix a bug in EDU Typing handling in syncapi.
When a user's typing status times out, it must advance both the Notifier and the EDUCache. This inconsistency meant that some Sytests that only does a single `/sync` saw a returned event stream it didn't expect (though empty), and failed. In production, this likely just has the effect of adding extra load on `/sync`, as the stream positions will resync the next time a user is added or removed via API.
This commit is contained in:
parent
aa50371999
commit
10b3330511
|
|
@ -74,6 +74,7 @@ func NewOutputTypingEventConsumer(
|
|||
func (s *OutputTypingEventConsumer) Start() error {
|
||||
s.eduCache.SetTimeoutCallback(func(userID, roomID string, latestSyncPosition int64) {
|
||||
pos := types.StreamPosition(latestSyncPosition)
|
||||
s.stream.Advance(pos)
|
||||
s.notifier.OnNewTyping(roomID, types.StreamingToken{TypingPosition: pos})
|
||||
})
|
||||
return s.typingConsumer.Start()
|
||||
|
|
|
|||
Loading…
Reference in a new issue