From 2a785948615b5d16f57e68b947b3b721364a02bc Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 12 Oct 2021 16:23:24 +0200 Subject: [PATCH] handle M_CONSENT_NOT_GIVEN, fix #15 --- matrix_webhook/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matrix_webhook/utils.py b/matrix_webhook/utils.py index 73c15ea..4116073 100644 --- a/matrix_webhook/utils.py +++ b/matrix_webhook/utils.py @@ -10,7 +10,10 @@ from nio.responses import RoomSendError, JoinError from . import conf -ERROR_MAP = {"M_FORBIDDEN": HTTPStatus.FORBIDDEN} +ERROR_MAP = { + "M_FORBIDDEN": HTTPStatus.FORBIDDEN, + "M_CONSENT_NOT_GIVEN": HTTPStatus.FORBIDDEN, +} LOGGER = logging.getLogger("matrix_webhook.utils") CLIENT = AsyncClient(conf.MATRIX_URL, conf.MATRIX_ID)