浏览代码

Merge pull request #2262 from 6vision/cancel_wecom_subscribe

Cancel subscribe_msg of wechatcomapp channel
develop
Saboteur7 GitHub 2 个月前
父节点
当前提交
c248d0f3f4
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. +6
    -5
      channel/wechatcom/wechatcomapp_channel.py

+ 6
- 5
channel/wechatcom/wechatcomapp_channel.py 查看文件

@@ -162,11 +162,12 @@ class Query:
logger.debug("[wechatcom] receive message: {}, msg= {}".format(message, msg))
if msg.type == "event":
if msg.event == "subscribe":
reply_content = subscribe_msg()
if reply_content:
reply = create_reply(reply_content, msg).render()
res = channel.crypto.encrypt_message(reply, nonce, timestamp)
return res
pass
# reply_content = subscribe_msg()
# if reply_content:
# reply = create_reply(reply_content, msg).render()
# res = channel.crypto.encrypt_message(reply, nonce, timestamp)
# return res
else:
try:
wechatcom_msg = WechatComAppMessage(msg, client=channel.client)


正在加载...
取消
保存