Add option to disable native stickers. Fixes #116

This commit is contained in:
Tulir Asokan
2018-04-28 22:09:40 +03:00
parent 797ff06d10
commit d332a429d6
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -100,6 +100,11 @@ bridge:
plaintext_highlights: false
# Whether or not to make portals of publicly joinable channels/supergroups publicly joinable on Matrix.
public_portals: true
# Whether to send stickers as the new native m.sticker type or normal m.images.
# Old versions of Riot don't support the new type at all.
#
# Remember that proper sticker support always requires Pillow to convert webp into png.
native_stickers: true
# The prefix for commands. Only required in non-management rooms.
command_prefix: "!tg"
+1
View File
@@ -176,6 +176,7 @@ class Config(DictWithRecursion):
copy("bridge.inline_images")
copy("bridge.plaintext_highlights")
copy("bridge.public_portals")
copy("bridge.native_stickers")
copy("bridge.command_prefix")
+1 -1
View File
@@ -1050,7 +1050,7 @@ class Portal:
"external_url": self.get_external_url(evt)
}
if attrs["is_sticker"]:
if attrs["is_sticker"] and config["bridge.native_stickers"]:
return await intent.send_sticker(**kwargs)
mime_type = info["mimetype"]