From 3fd822436a5eab29a107d3f6a36ecf0d158f5526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=91=E8=B4=A8?= Date: Wed, 7 Feb 2024 15:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86OPQBot=E5=B9=B3=E5=8F=B0=E7=BE=A4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AE=BE=E7=BD=AE=E4=B8=BA=E4=B8=8D=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E7=BE=A4=E8=BA=AB=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OlivOS/adapter/OPQBot/OPQBotSDK.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OlivOS/adapter/OPQBot/OPQBotSDK.py b/OlivOS/adapter/OPQBot/OPQBotSDK.py index 103b38d7..a8455eb7 100644 --- a/OlivOS/adapter/OPQBot/OPQBotSDK.py +++ b/OlivOS/adapter/OPQBot/OPQBotSDK.py @@ -147,7 +147,8 @@ def get_Event_from_SDK(target_event): target_event.data.sender['name'] = target_event.data.sender['nickname'] target_event.data.sender['sex'] = 'unknown' target_event.data.sender['age'] = 0 - target_event.data.sender['role'] = 'member' + if 'role' in target_event.data.sender: + target_event.data.sender.pop('role') target_event.data.host_id = None elif target_event.sdk_event.payload.EventName == 'ON_EVENT_FRIEND_NEW_MSG': if type(target_event.sdk_event.payload.EventData) is dict \ @@ -186,7 +187,6 @@ def get_Event_from_SDK(target_event): target_event.data.sender['name'] = target_event.data.sender['nickname'] target_event.data.sender['sex'] = 'unknown' target_event.data.sender['age'] = 0 - target_event.data.sender['role'] = 'member' target_event.data.host_id = None elif False and target_event.sdk_event.payload.EventName == 'ON_EVENT_FRIEND_NEW_MSG': if type(target_event.sdk_event.payload.EventData) is dict \