Support Facebook stickers

This commit is contained in:
Alex 2020-03-13 10:13:31 +01:00
parent 6c118d651e
commit 06929747d6

11
external/messenger.py vendored
View file

@ -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)