Skip to content

Commit

Permalink
at中的id以atNtUin为准
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Oct 11, 2023
1 parent d90ac8d commit 4464591
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions OlivOS/qqRedSDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def get_message_obj(elements:list):
for element_this in elements:
if 'textElement' in element_this and type(element_this['textElement']) is dict \
and 'atType' in element_this['textElement'] and type(element_this['textElement']['atType']) is int \
and 'atUid' in element_this['textElement'] and type(element_this['textElement']['atUid']) is str \
and 'atNtUin' in element_this['textElement'] and type(element_this['textElement']['atNtUin']) is str \
and 2 == element_this['textElement']['atType']:
message_list.append(OlivOS.messageAPI.PARA.at(id=element_this['textElement']['atUid']))
message_list.append(OlivOS.messageAPI.PARA.at(id=element_this['textElement']['atNtUin']))
flag_hit = True
elif 'textElement' in element_this and type(element_this['textElement']) is dict \
and 'content' in element_this['textElement'] and type(element_this['textElement']['content']) is str:
Expand Down Expand Up @@ -149,8 +149,6 @@ def get_Event_from_SDK(target_event):
target_event.data.host_id = None
elif 'chatType' in payload_data and payload_data['chatType'] == 1 \
and 'peerUin' in payload_data and type(payload_data['peerUin']) is str \
and (('sendNickName' in payload_data and type(payload_data['sendNickName']) is str) \
or ('sendMemberName' in payload_data and type(payload_data['sendMemberName']) is str)) \
and 'elements' in payload_data and type(payload_data['elements']) is list \
and len(payload_data['elements']) > 0:
message_obj = get_message_obj(payload_data['elements'])
Expand Down

0 comments on commit 4464591

Please sign in to comment.