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: