From 113c8fb8bc4134e6cd94b423f118b71d713f58ad Mon Sep 17 00:00:00 2001 From: PidgeyL Date: Tue, 29 Dec 2015 16:09:41 +0100 Subject: [PATCH] automatically mark messages as delivered and read --- fbchat/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fbchat/client.py b/fbchat/client.py index 7888863..c4e1ad5 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -405,7 +405,6 @@ class Client(object): ''' if 'ms' not in content: return - for m in content['ms']: if m.get('type') not in ['m_messaging', 'messaging']: continue @@ -441,4 +440,6 @@ class Client(object): break def on_message(self, mid, author_id, author_name, message, metadata): + self.markAsDelivered(fbid, mid) + self.markAsRead(fbid) print("%s said: %s"%(author_name, message))