diff --git a/pnut-bridge.py b/pnut-bridge.py index 4d0f70b..f4da8b0 100644 --- a/pnut-bridge.py +++ b/pnut-bridge.py @@ -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