Add option to disable /syncing with custom puppets
This commit is contained in:
@@ -125,6 +125,9 @@ bridge:
|
|||||||
# Whether or not to fetch and handle Telegram updates at startup from the time the bridge was down.
|
# Whether or not to fetch and handle Telegram updates at startup from the time the bridge was down.
|
||||||
# WARNING: Probably buggy, might get stuck in infinite loop.
|
# WARNING: Probably buggy, might get stuck in infinite loop.
|
||||||
catch_up: false
|
catch_up: false
|
||||||
|
# Whether or not to use /sync to get presence, read receipts and typing notifications when using
|
||||||
|
# your own Matrix account as the Matrix puppet for your Telegram account.
|
||||||
|
sync_with_custom_puppets: true
|
||||||
|
|
||||||
# The formats to use when sending messages to Telegram via the relay bot.
|
# The formats to use when sending messages to Telegram via the relay bot.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ class Config(DictWithRecursion):
|
|||||||
copy("bridge.public_portals")
|
copy("bridge.public_portals")
|
||||||
copy("bridge.native_stickers")
|
copy("bridge.native_stickers")
|
||||||
copy("bridge.catch_up")
|
copy("bridge.catch_up")
|
||||||
|
copy("bridge.sync_with_custom_puppets")
|
||||||
|
|
||||||
if "bridge.message_formats.m_text" in self:
|
if "bridge.message_formats.m_text" in self:
|
||||||
del self["bridge.message_formats"]
|
del self["bridge.message_formats"]
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ class Puppet:
|
|||||||
if mxid != self.custom_mxid:
|
if mxid != self.custom_mxid:
|
||||||
return 2
|
return 2
|
||||||
return 1
|
return 1
|
||||||
asyncio.ensure_future(self.sync(), loop=self.loop)
|
if config["bridge.sync_with_custom_puppets"]:
|
||||||
|
asyncio.ensure_future(self.sync(), loop=self.loop)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def create_sync_filter(self) -> Awaitable[str]:
|
def create_sync_filter(self) -> Awaitable[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user