aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-03-13 10:13:31 +0100
committerAlex Auvolat <alex@adnab.me>2020-03-13 10:13:31 +0100
commit06929747d6ce8898e29e60fc3f53985416b5b1db (patch)
tree780a2a0aeee5ed031e5b6c08658bd79d1804c96e
parent6c118d651eda5f6a86066b1e84e352c71fc6342f (diff)
downloadeasybridge-06929747d6ce8898e29e60fc3f53985416b5b1db.tar.gz
easybridge-06929747d6ce8898e29e60fc3f53985416b5b1db.zip
Support Facebook stickers
-rwxr-xr-xexternal/messenger.py11
1 files changed, 11 insertions, 0 deletions
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)