diff --git a/app/classes/controllers/servers_controller.py b/app/classes/controllers/servers_controller.py index 95c54bdb..92a68d81 100644 --- a/app/classes/controllers/servers_controller.py +++ b/app/classes/controllers/servers_controller.py @@ -173,7 +173,7 @@ class ServersController(metaclass=Singleton): self.failed_servers = [] for server in servers: - self.ws.broadcast( + self.ws.broadcast_to_admins( "update", {"message": f"Initializing {server['server_name']}."} ) server_id = server.get("server_id") diff --git a/app/classes/shared/websocket_manager.py b/app/classes/shared/websocket_manager.py index f48adef8..b840ba36 100644 --- a/app/classes/shared/websocket_manager.py +++ b/app/classes/shared/websocket_manager.py @@ -37,7 +37,7 @@ class WebSocketManager(metaclass=Singleton): def broadcast_to_admins(self, event_type: str, data): def filter_fn(client): - if client.get_user_id in HelperUsers.get_super_user_list(): + if str(client.get_user_id()) in str(HelperUsers.get_super_user_list()): return True return False diff --git a/main.py b/main.py index 35608ca0..452e89f0 100644 --- a/main.py +++ b/main.py @@ -195,6 +195,7 @@ if __name__ == "__main__": # init servers logger.info("Initializing all servers defined") Console.info("Initializing all servers defined") + ws.broadcast("update", {"message": "Initializing Servers"}) controller.servers.init_all_servers() def tasks_starter():