|
|
@@ -83,8 +83,9 @@ async def handle_self_cmd_async(request: Request,wxid,msg): |
|
|
|
''' |
|
|
|
msg_data=msg.get("Data") |
|
|
|
to_wxid=msg_data["ToUserName"]["string"] |
|
|
|
from_wxid=msg_data["FromUserName"]["string"] |
|
|
|
msg_content=msg_data["Content"]["string"] |
|
|
|
if wxid == to_wxid: |
|
|
|
if from_wxid == to_wxid: |
|
|
|
commands = { |
|
|
|
'启用托管': True, |
|
|
|
'关闭托管': False |
|
|
@@ -381,7 +382,7 @@ async def handle_text_async(request: Request,token_id,app_id, wxid,msg_data,from |
|
|
|
|
|
|
|
|
|
|
|
msg_content=msg_data["Content"]["string"] |
|
|
|
if wxid == to_wxid: #手动发送消息 |
|
|
|
if from_wxid == to_wxid: #手动发送消息 |
|
|
|
logger.info("Active message sending detected") |
|
|
|
|
|
|
|
await request.app.state.gewe_service.save_contacts_brief_to_cache_async(token_id,app_id,wxid,[to_wxid]) |
|
|
@@ -678,7 +679,7 @@ async def handle_text_group_async(request: Request,token_id,app_id, wxid,msg_dat |
|
|
|
logger.warning(f"微信号 {wxid} 关闭好友和群自动回复功能,{handle_text_group_async.__name__} 不回复消息") |
|
|
|
return |
|
|
|
|
|
|
|
if wxid == to_wxid: #手动发送消息 |
|
|
|
if from_wxid == to_wxid: #手动发送消息 |
|
|
|
logger.info("Active message sending detected") |
|
|
|
|
|
|
|
await request.app.state.gewe_service.save_contacts_brief_to_cache_async(token_id,app_id,wxid,[to_wxid]) |
|
|
|