add config option, update roadmap
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@
|
||||
* [x] Automatic portal creation
|
||||
* [x] At startup
|
||||
* [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 own Matrix account for messages sent from other Telegram clients (double puppeting)
|
||||
* [ ] ‡ Calls (hard, not yet supported by Telethon)
|
||||
|
||||
@@ -130,6 +130,7 @@ class Config(BaseBridgeConfig):
|
||||
copy("bridge.sync_direct_chat_list")
|
||||
copy("bridge.double_puppet_server_map")
|
||||
copy("bridge.double_puppet_allow_discovery")
|
||||
copy("bridge.create_group_on_invite")
|
||||
if "bridge.login_shared_secret" in self:
|
||||
base["bridge.login_shared_secret_map"] = {
|
||||
base["homeserver.domain"]: self["bridge.login_shared_secret"]
|
||||
|
||||
@@ -312,6 +312,9 @@ bridge:
|
||||
kick_on_logout: true
|
||||
# Should the "* user joined Telegram" notice always be marked as read automatically?
|
||||
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.
|
||||
backfill:
|
||||
# Whether or not the Telegram ghosts of logged in Matrix users should be
|
||||
|
||||
@@ -71,6 +71,11 @@ class MatrixHandler(BaseMatrixHandler):
|
||||
evt: StateEvent,
|
||||
members: list[UserID],
|
||||
) -> 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)
|
||||
if not double_puppet or self.az.bot_mxid 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."
|
||||
)
|
||||
return
|
||||
elif not self.config["bridge.create_group_on_invite"]:
|
||||
return
|
||||
|
||||
await double_puppet.intent.invite_user(room_id, self.az.bot_mxid)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user