add config option, update roadmap
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@
|
|||||||
* [x] Automatic portal creation
|
* [x] Automatic portal creation
|
||||||
* [x] At startup
|
* [x] At startup
|
||||||
* [x] When receiving invite or message
|
* [x] When receiving invite or message
|
||||||
* [x] Private chat creation by inviting Matrix puppet of Telegram user to new room
|
* [x] Portal creation by inviting Matrix puppet of Telegram user to new room
|
||||||
* [x] Option to use bot to relay messages for unauthenticated Matrix users (relaybot)
|
* [x] Option to use bot to relay messages for unauthenticated Matrix users (relaybot)
|
||||||
* [x] Option to use own Matrix account for messages sent from other Telegram clients (double puppeting)
|
* [x] Option to use own Matrix account for messages sent from other Telegram clients (double puppeting)
|
||||||
* [ ] ‡ Calls (hard, not yet supported by Telethon)
|
* [ ] ‡ Calls (hard, not yet supported by Telethon)
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ class Config(BaseBridgeConfig):
|
|||||||
copy("bridge.sync_direct_chat_list")
|
copy("bridge.sync_direct_chat_list")
|
||||||
copy("bridge.double_puppet_server_map")
|
copy("bridge.double_puppet_server_map")
|
||||||
copy("bridge.double_puppet_allow_discovery")
|
copy("bridge.double_puppet_allow_discovery")
|
||||||
|
copy("bridge.create_group_on_invite")
|
||||||
if "bridge.login_shared_secret" in self:
|
if "bridge.login_shared_secret" in self:
|
||||||
base["bridge.login_shared_secret_map"] = {
|
base["bridge.login_shared_secret_map"] = {
|
||||||
base["homeserver.domain"]: self["bridge.login_shared_secret"]
|
base["homeserver.domain"]: self["bridge.login_shared_secret"]
|
||||||
|
|||||||
@@ -312,6 +312,9 @@ bridge:
|
|||||||
kick_on_logout: true
|
kick_on_logout: true
|
||||||
# Should the "* user joined Telegram" notice always be marked as read automatically?
|
# Should the "* user joined Telegram" notice always be marked as read automatically?
|
||||||
always_read_joined_telegram_notice: true
|
always_read_joined_telegram_notice: true
|
||||||
|
# auto-create group chat portals by inviting Matrix puppet of Telegram user to a room
|
||||||
|
# requires double-puppeting to be enabled
|
||||||
|
create_group_on_invite: true
|
||||||
# Settings for backfilling messages from Telegram.
|
# Settings for backfilling messages from Telegram.
|
||||||
backfill:
|
backfill:
|
||||||
# Whether or not the Telegram ghosts of logged in Matrix users should be
|
# Whether or not the Telegram ghosts of logged in Matrix users should be
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ class MatrixHandler(BaseMatrixHandler):
|
|||||||
evt: StateEvent,
|
evt: StateEvent,
|
||||||
members: list[UserID],
|
members: list[UserID],
|
||||||
) -> None:
|
) -> None:
|
||||||
|
if not invited_by.is_logged_in:
|
||||||
|
await puppet.default_mxid_intent.leave_room(
|
||||||
|
room_id, reason="You are not logged into this Telegram bridge"
|
||||||
|
)
|
||||||
|
return
|
||||||
double_puppet = await pu.Puppet.get_by_custom_mxid(invited_by.mxid)
|
double_puppet = await pu.Puppet.get_by_custom_mxid(invited_by.mxid)
|
||||||
if not double_puppet or self.az.bot_mxid in members:
|
if not double_puppet or self.az.bot_mxid in members:
|
||||||
if self.az.bot_mxid not in members:
|
if self.az.bot_mxid not in members:
|
||||||
@@ -92,6 +97,8 @@ class MatrixHandler(BaseMatrixHandler):
|
|||||||
room_id, reason="You do not have the permissions to bridge this room."
|
room_id, reason="You do not have the permissions to bridge this room."
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
elif not self.config["bridge.create_group_on_invite"]:
|
||||||
|
return
|
||||||
|
|
||||||
await double_puppet.intent.invite_user(room_id, self.az.bot_mxid)
|
await double_puppet.intent.invite_user(room_id, self.az.bot_mxid)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user