Merge pull request #116 from dylhack/master
Re-visioned Join on Invite Environment Variable
This commit is contained in:
commit
9d0d3086da
|
@ -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.
|
||||
|
||||
|
|
2
bot.py
2
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
|
||||
|
|
Loading…
Reference in New Issue