Update where the stream marker gets set to avoid the possibility of duplicate messages during the transition.
This commit is contained in:
parent
66c7acb36d
commit
0e93f9cd5d
1 changed files with 4 additions and 2 deletions
|
@ -196,9 +196,11 @@ class ChannelMonitor(threading.Thread):
|
|||
# update the last message id
|
||||
if len(messages) > 0:
|
||||
room.pnut_since = messages[0].id
|
||||
db.session.commit()
|
||||
|
||||
# update the stream marker
|
||||
if 'max_id' in meta:
|
||||
self.update_marker(room.pnut_chan, meta.max_id)
|
||||
db.session.commit()
|
||||
|
||||
# empty the queue to the matrix room
|
||||
for item in pqueue:
|
||||
|
|
Loading…
Reference in a new issue