Allow connecting to SSL endpoints

This commit is contained in:
Andreas Kotes 2020-11-15 20:03:57 +01:00
parent 3cbcbc06c3
commit b403e947ae
No known key found for this signature in database
GPG Key ID: 5C5E3BFE32B47A48
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -361,7 +361,7 @@ class Bot:
owners_only = os.getenv('OWNERS_ONLY') is not None owners_only = os.getenv('OWNERS_ONLY') is not None
if matrix_server and self.matrix_user and bot_owners and access_token: if matrix_server and self.matrix_user and bot_owners and access_token:
self.client = AsyncClient(matrix_server, self.matrix_user) self.client = AsyncClient(matrix_server, self.matrix_user, ssl = matrix_server.startswith("https://"))
self.client.access_token = access_token self.client.access_token = access_token
self.join_on_invite = join_on_invite is not None self.join_on_invite = join_on_invite is not None
self.owners = bot_owners.split(',') self.owners = bot_owners.split(',')