From 0ea489b694e1ea1902fcd01d81869d1f84389655 Mon Sep 17 00:00:00 2001 From: timotheyca Date: Fri, 14 Aug 2020 02:48:37 +0300 Subject: [PATCH] no self-dialog pushmsg --- v25/storage/dbstorage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v25/storage/dbstorage.py b/v25/storage/dbstorage.py index 548a013..bc269f0 100644 --- a/v25/storage/dbstorage.py +++ b/v25/storage/dbstorage.py @@ -179,6 +179,8 @@ class DBStorage(PushStorage): session.add(msg.sgn()) self.event(session, m, EVENT_PUSH) session.commit() + if m.sfrom == m.sto: + return state = PushState.of(m.sto) with state.lock: state.pushmsg = True