From 26d88fa7d834af8f8aff2f2f2c547dfc77230cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20B=C3=BCchner?= Date: Mon, 4 Nov 2024 01:16:19 +0100 Subject: [PATCH] import treq --- synapse_invite_checker/invite_checker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse_invite_checker/invite_checker.py b/synapse_invite_checker/invite_checker.py index c0c65de..0c0710a 100644 --- a/synapse_invite_checker/invite_checker.py +++ b/synapse_invite_checker/invite_checker.py @@ -2,6 +2,7 @@ import requests import json import time import os +import treq from twisted.internet.defer import inlineCallbacks, returnValue from synapse.module_api import ModuleApi, errors from synapse.types import UserID @@ -200,9 +201,8 @@ class InviteChecker: } try: - # Send the message directly send_response = yield treq.put(send_url, headers=headers, json=content) - response_body = yield send_response.text() # Capture the response text for logging + response_body = yield send_response.text() if send_response.code == 200: logger.info(f"Message sent to room {self.config.announcement_room_id}: {message_content}") else: