diff --git a/README.md b/README.md index bf19178..bf99965 100644 --- a/README.md +++ b/README.md @@ -412,7 +412,7 @@ Example commands: ### Relay bridge -Bridges two or more Matrix rooms together via relaybot. +Bridges two or more Matrix rooms together via relaybot. Note: Room ID is not same as room alias! Rooms can exist without aliases so ID's are more flexible. Room id is usually in format !123LotOfRandomChars:server.org @@ -518,7 +518,7 @@ docker-compose up ## Env variables `MATRIX_USER`, `MATRIX_ACCESS_TOKEN` and `MATRIX_SERVER` should be self-explanatory. -Set `JOIN_ON_INVITE` to anything if you want the bot to join invites automatically (do not set it if you don't want it to join). +Set `JOIN_ON_INVITE` (default true) to false if you don't want the bot automatically joining rooms. You can get access token by logging in with Riot and looking from Settings / Help & About. diff --git a/bot.py b/bot.py index 6fdf63f..3843443 100755 --- a/bot.py +++ b/bot.py @@ -391,7 +391,7 @@ class Bot: if matrix_server and self.matrix_user and bot_owners and access_token: self.client = AsyncClient(matrix_server, self.matrix_user, ssl = matrix_server.startswith("https://")) self.client.access_token = access_token - self.join_on_invite = join_on_invite is not None + self.join_on_invite = (join_on_invite or '').lower() == 'true' self.leave_empty_rooms = (leave_empty_rooms or 'true').lower() == 'true' self.owners = bot_owners.split(',') self.owners_only = owners_only