🔧(settings) rename matrix bot token variable
rename "tchap access token" to "matrix bot access token" to fit general uses
This commit is contained in:
committed by
Marie
parent
709628a26a
commit
5327baacbd
@@ -28,14 +28,12 @@ session.mount("https://", adapter)
|
||||
|
||||
class MatrixAPIClient:
|
||||
"""A client to interact with Matrix API"""
|
||||
|
||||
secret = settings.TCHAP_ACCESS_TOKEN
|
||||
|
||||
|
||||
def get_headers(self, webhook):
|
||||
"""Build header dict from webhook object."""
|
||||
headers = {"Content-Type": "application/json"}
|
||||
if "tchap.gouv.fr" in webhook.url:
|
||||
token = settings.TCHAP_ACCESS_TOKEN
|
||||
token = settings.MATRIX_BOT_ACCESS_TOKEN
|
||||
elif webhook.secret:
|
||||
token = webhook.secret
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user