Fix onTyping detection
FB changed the format of typing notification messages: - update "mtype" from "typ" to "ttyp". - Get thread ID from "to" to "thread_fbid" ("thread" looks the same)
This commit is contained in:
@@ -1529,9 +1529,9 @@ class Client(object):
|
|||||||
self.onInbox(unseen=m["unseen"], unread=m["unread"], recent_unread=m["recent_unread"], msg=m)
|
self.onInbox(unseen=m["unseen"], unread=m["unread"], recent_unread=m["recent_unread"], msg=m)
|
||||||
|
|
||||||
# Typing
|
# Typing
|
||||||
elif mtype == "typ":
|
elif mtype == "ttyp":
|
||||||
author_id = str(m.get("from"))
|
author_id = str(m.get("from"))
|
||||||
thread_id = str(m.get("to"))
|
thread_id = str(m.get("thread_fbid"))
|
||||||
if thread_id == self.uid:
|
if thread_id == self.uid:
|
||||||
thread_type = ThreadType.USER
|
thread_type = ThreadType.USER
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user