Skip to content

Commit

Permalink
🐛 修复信任QQ失效
Browse files Browse the repository at this point in the history
  • Loading branch information
MoeSnowyFox committed Jul 18, 2024
1 parent 65b39f8 commit 1396110
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ async def processing_json(self, data):
sender_user_id = data.get('sender', {}).get('user_id')
message = ' '.join([item['data']['text'] for item in data['message'] if item['type'] == 'text'])
logging.info(f"收到QQ{sender_user_id}的消息:{message}")
reply_message = await self.produce_reply(message, sender_user_id)
reply = await build_reply_json(reply_message, sender_user_id)
return reply
if sender_user_id in self.trust_qq_list:
reply_message = await self.produce_reply(message, sender_user_id)
reply = await build_reply_json(reply_message, sender_user_id)
return reply
else:
return None
else:
return None

Expand Down

0 comments on commit 1396110

Please sign in to comment.