Fix warning log calls
This commit is contained in:
@@ -83,8 +83,8 @@ class TelegramBridge(Bridge):
|
||||
if prometheus:
|
||||
prometheus.start_http_server(self.config["metrics.listen_port"])
|
||||
else:
|
||||
self.log.warn("Metrics are enabled in the config, "
|
||||
"but prometheus_client is not installed.")
|
||||
self.log.warning("Metrics are enabled in the config, "
|
||||
"but prometheus_client is not installed.")
|
||||
|
||||
def prepare_bridge(self) -> None:
|
||||
self.bot = init_bot(self.config)
|
||||
|
||||
@@ -511,7 +511,7 @@ class PortalMetadata(BasePortal, ABC):
|
||||
try:
|
||||
await self.main_intent.kick_user(self.mxid, user.mxid, kick_message)
|
||||
except MForbidden as e:
|
||||
self.log.warn(f"Failed to kick {user.mxid}: {e}")
|
||||
self.log.warning(f"Failed to kick {user.mxid}: {e}")
|
||||
|
||||
async def update_info(self, user: 'AbstractUser', entity: TypeChat = None) -> None:
|
||||
if self.peer_type == "user":
|
||||
|
||||
@@ -321,7 +321,7 @@ class User(AbstractUser):
|
||||
archived=False):
|
||||
entity = dialog.entity
|
||||
if isinstance(entity, Chat) and (entity.deactivated or entity.left):
|
||||
self.log.warn(f"Ignoring deactivated or left chat {entity} while syncing")
|
||||
self.log.warning(f"Ignoring deactivated or left chat {entity} while syncing")
|
||||
continue
|
||||
elif isinstance(entity, TLUser) and not config["bridge.sync_direct_chats"]:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user