Commit ea790386 authored by Tulir Asokan's avatar Tulir Asokan

Un-hardcode list of users to invite to chat

parent 54bb8242
Pipeline #251 passed with stages
in 1 minute and 12 seconds
......@@ -59,6 +59,9 @@ bridge:
# The prefix for commands. Only required in non-management rooms.
command_prefix: "!tw"
# List of users to always invite to newly created portal rooms.
invite_users: []
# Whether or not created rooms should have federation enabled.
# If false, created portal rooms will never be federated.
federate_rooms: true
......
......@@ -32,6 +32,8 @@ class Config(BaseBridgeConfig):
copy("bridge.username_template")
copy("bridge.command_prefix")
copy("bridge.invite_users")
copy("bridge.federate_rooms")
copy("bridge.initial_state")
......
......@@ -118,7 +118,7 @@ class Portal(BasePortal):
initial_state[EventType.ROOM_POWER_LEVELS].content.users[self.az.bot_mxid] = 100
self.mxid = await self.az.intent.create_room(name=puppet.displayname,
invitees=[self.main_intent.mxid,
"@tulir:pc.mau.dev"],
*config["bridge.invite_users"]],
creation_content=creation_content,
initial_state=list(initial_state.values()))
if not self.mxid:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment