Add option to disable native stickers. Fixes #116
This commit is contained in:
@@ -100,6 +100,11 @@ bridge:
|
|||||||
plaintext_highlights: false
|
plaintext_highlights: false
|
||||||
# Whether or not to make portals of publicly joinable channels/supergroups publicly joinable on Matrix.
|
# Whether or not to make portals of publicly joinable channels/supergroups publicly joinable on Matrix.
|
||||||
public_portals: true
|
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.
|
# The prefix for commands. Only required in non-management rooms.
|
||||||
command_prefix: "!tg"
|
command_prefix: "!tg"
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ class Config(DictWithRecursion):
|
|||||||
copy("bridge.inline_images")
|
copy("bridge.inline_images")
|
||||||
copy("bridge.plaintext_highlights")
|
copy("bridge.plaintext_highlights")
|
||||||
copy("bridge.public_portals")
|
copy("bridge.public_portals")
|
||||||
|
copy("bridge.native_stickers")
|
||||||
|
|
||||||
copy("bridge.command_prefix")
|
copy("bridge.command_prefix")
|
||||||
|
|
||||||
|
|||||||
@@ -1050,7 +1050,7 @@ class Portal:
|
|||||||
"external_url": self.get_external_url(evt)
|
"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)
|
return await intent.send_sticker(**kwargs)
|
||||||
|
|
||||||
mime_type = info["mimetype"]
|
mime_type = info["mimetype"]
|
||||||
|
|||||||
Reference in New Issue
Block a user