From 45303005b8b635fd27374fa0ba3600d7a1b7c3bb Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 14 Jan 2020 23:27:50 +0100 Subject: [PATCH] Fix onFriendRequest --- fbchat/_client.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fbchat/_client.py b/fbchat/_client.py index 582f89a..e491d19 100644 --- a/fbchat/_client.py +++ b/fbchat/_client.py @@ -2768,9 +2768,15 @@ class Client(object): msg=m, ) - elif topic == "jewel_requests_add": - from_id = m["from"] - self.onFriendRequest(from_id=from_id, msg=m) + # Other notifications + elif topic == "/legacy_web": + # Friend request + if m["type"] == "jewel_requests_add": + from_id = m["from"] + # TODO: from_id = str(from_id) + self.onFriendRequest(from_id=from_id, msg=m) + else: + self.onUnknownMesssageType(msg=m) # Chat timestamp / Buddylist overlay elif topic == "/orca_presence":