Commit 0e93f9cd authored by Morgan McMillian's avatar Morgan McMillian

Update where the stream marker gets set to avoid the possibility of duplicate...

Update where the stream marker gets set to avoid the possibility of duplicate messages during the transition.
parent 66c7acb3
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment