automatically mark messages as delivered and read
This commit is contained in:
@@ -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))
|
||||||
|
Reference in New Issue
Block a user