From 211381a9a8222134a247bb90b08881d2ac3ee9b9 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 28 Dec 2017 13:06:26 +0100 Subject: [PATCH] Skip already processed messages --- pyrogram/session/session.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index b68e3fa0..c7cf2f68 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -257,7 +257,10 @@ class Session: for i in messages: if i.seq_no % 2 != 0: - self.pending_acks.add(i.msg_id) + if i.msg_id in self.pending_acks: + continue + else: + self.pending_acks.add(i.msg_id) # log.debug("{}".format(type(i.body)))