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,10 +196,12 @@ class ChannelMonitor(threading.Thread):
|
|||
# update the last message id
|
||||
if len(messages) > 0:
|
||||
room.pnut_since = messages[0].id
|
||||
if 'max_id' in meta:
|
||||
self.update_marker(room.pnut_chan, meta.max_id)
|
||||
db.session.commit()
|
||||
|
||||
# update the stream marker
|
||||
if 'max_id' in meta:
|
||||
self.update_marker(room.pnut_chan, meta.max_id)
|
||||
|
||||
# empty the queue to the matrix room
|
||||
for item in pqueue:
|
||||
self.txId += 1
|
||||
|
|
Loading…
Reference in a new issue