automatically mark messages as delivered and read

This commit is contained in:
PidgeyL
2015-12-29 16:09:41 +01:00
parent a6a05203a4
commit 113c8fb8bc

View File

@@ -405,7 +405,6 @@ class Client(object):
''' '''
if 'ms' not in content: if 'ms' not in content:
return return
for m in content['ms']: for m in content['ms']:
if m.get('type') not in ['m_messaging', 'messaging']: if m.get('type') not in ['m_messaging', 'messaging']:
continue continue
@@ -441,4 +440,6 @@ class Client(object):
break break
def on_message(self, mid, author_id, author_name, message, metadata): 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)) print("%s said: %s"%(author_name, message))