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:
2FWAH
2018-06-01 12:57:09 +02:00
committed by Mads Marquart
parent e614800d5f
commit cebe7a28c0

View File

@@ -1529,9 +1529,9 @@ class Client(object):
self.onInbox(unseen=m["unseen"], unread=m["unread"], recent_unread=m["recent_unread"], msg=m)
# Typing
elif mtype == "typ":
elif mtype == "ttyp":
author_id = str(m.get("from"))
thread_id = str(m.get("to"))
thread_id = str(m.get("thread_fbid"))
if thread_id == self.uid:
thread_type = ThreadType.USER
else: