From b8350e9c412024c865420f65a48a891d295829da Mon Sep 17 00:00:00 2001 From: tursom <tursom@foxmail.com> Date: Fri, 1 Mar 2024 15:29:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=5Fglobal=5Fcallback=20?= =?UTF-8?q?=E6=94=B6=E4=B8=8D=E5=88=B0=E4=BD=8D=E7=BD=AE=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blivedm/handlers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blivedm/handlers.py b/blivedm/handlers.py index 81c4301..3bcd51a 100644 --- a/blivedm/handlers.py +++ b/blivedm/handlers.py @@ -118,6 +118,8 @@ class BaseHandler(HandlerInterface): if pos != -1: cmd = cmd[:pos] + self._global_callback(client, command) + if cmd not in self._CMD_CALLBACK_DICT: # 只有第一次遇到未知cmd时打日志 if cmd not in logged_unknown_cmds: @@ -129,8 +131,6 @@ class BaseHandler(HandlerInterface): if callback is not None: callback(self, client, command) - self._global_callback(client, command) - def _global_callback(self, client: ws_base.WebSocketClientBase, message: dict): pass