From 9b9e1a67fcf0c45ce88650d766738dee8383683d Mon Sep 17 00:00:00 2001 From: PC-Admin Date: Fri, 18 Aug 2023 00:15:25 +0800 Subject: [PATCH] remove use of Union and error codes i couldnt get working --- redlight_client_module.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/redlight_client_module.py b/redlight_client_module.py index e6e6855..6d58595 100755 --- a/redlight_client_module.py +++ b/redlight_client_module.py @@ -2,7 +2,6 @@ import logging import hashlib import json import asyncio -from typing import Union from synapse.module_api import ModuleApi, NOT_SPAM from synapse.api.errors import AuthError from redlight_alert_bot import RedlightAlertBot @@ -58,7 +57,7 @@ class RedlightClientModule: async def user_may_join_room( self, user: str, room: str, is_invited: bool - ) -> Union["synapse.module_api.NOT_SPAM", "synapse.module_api.errors.Codes"]: + ) -> NOT_SPAM: logger.info(f"User {user} is attempting to join room {room}. Invitation status: {is_invited}.")