From 06929747d6ce8898e29e60fc3f53985416b5b1db Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 13 Mar 2020 10:13:31 +0100 Subject: Support Facebook stickers --- external/messenger.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'external') diff --git a/external/messenger.py b/external/messenger.py index e45a45e..3df1a5c 100755 --- a/external/messenger.py +++ b/external/messenger.py @@ -502,6 +502,17 @@ class MessengerBridge: else: event["text"] += "\nUnhandled attachment: {}".format(at) + if isinstance(message_object.sticker, Sticker): + stk = message_object.sticker + event["attachments"].append({ + "filename": stk.label, + "url": stk.url, + "image_size": { + "width": stk.width, + "height": stk.height, + }, + }) + if thread_type == ThreadType.GROUP: event["room"] = thread_id self.ensureJoined(author, thread_id) -- cgit v1.2.3