add config option, update roadmap

This commit is contained in:
Malte E
2022-07-12 21:25:52 +02:00
parent 565bb87470
commit 3dd0c51be7
4 changed files with 12 additions and 1 deletions
+7
View File
@@ -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)