thread_fbid
is not available with typ
, there thread_id = author_id
Also enabled tests
This commit is contained in:
@@ -1531,11 +1531,16 @@ class Client(object):
|
||||
# Typing
|
||||
elif mtype == "typ" or mtype == "ttyp":
|
||||
author_id = str(m.get("from"))
|
||||
thread_id = str(m.get("thread_fbid"))
|
||||
if thread_id == self.uid:
|
||||
thread_type = ThreadType.USER
|
||||
else:
|
||||
thread_id = m.get("thread_fbid")
|
||||
if thread_id:
|
||||
thread_type = ThreadType.GROUP
|
||||
thread_id = str(thread_id)
|
||||
else:
|
||||
thread_type = ThreadType.USER
|
||||
if author_id == self.uid:
|
||||
thread_id = m.get("to")
|
||||
else:
|
||||
thread_id = author_id
|
||||
typing_status = TypingStatus(m.get("st"))
|
||||
self.onTyping(author_id=author_id, status=typing_status, thread_id=thread_id, thread_type=thread_type, msg=m)
|
||||
|
||||
|
Reference in New Issue
Block a user