瀏覽代碼

调整

d1
H Vs 3 週之前
父節點
當前提交
0ae83b7709
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      app/endpoints/pipeline_endpoint.py

+ 2
- 2
app/endpoints/pipeline_endpoint.py 查看文件

@@ -43,9 +43,9 @@ async def get_messages(request: Request, body: Dict[str, Any]):
from_wxid = msg_data["FromUserName"]["string"] from_wxid = msg_data["FromUserName"]["string"]
config=await request.app.state.redis_service.get_hash(f"__AI_OPS_WX__:WXCHAT_CONFIG") config=await request.app.state.redis_service.get_hash(f"__AI_OPS_WX__:WXCHAT_CONFIG")
wxids=config.keys() wxids=config.keys()
WX_BACKLIST.extend(wxids)
meged_backlist_wxids=wxids+WX_BACKLIST
# 公众号ID已gh_开头 # 公众号ID已gh_开头
if from_wxid in WX_BACKLIST or 'gh_' in from_wxid:
if from_wxid in meged_backlist_wxids or 'gh_' in from_wxid:
logger.warning(f'来自微信ID {from_wxid} 在黑名单,发送给 {wxid} ,不处理') logger.warning(f'来自微信ID {from_wxid} 在黑名单,发送给 {wxid} ,不处理')
return {"message": "收到微信回调消息"} return {"message": "收到微信回调消息"}




Loading…
取消
儲存