🔧(settings) rename matrix bot token variable

rename "tchap access token" to "matrix bot access token" to
fit general uses
This commit is contained in:
Marie PUPO JEAMMET
2025-06-26 16:20:05 +02:00
committed by Marie
parent 709628a26a
commit 5327baacbd
4 changed files with 6 additions and 8 deletions

View File

@@ -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: