Merge pull request #109 from berlincount/ssl_support

Allow connecting to SSL endpoints
This commit is contained in:
Ville Ranki 2020-11-15 22:00:18 +02:00 committed by GitHub
commit 9e8902f7ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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(',')