Browse Source

Cancel subscribe_msg of wechatcomapp channel

master
6vision 3 months ago
parent
commit
4eaa2b93c6
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      channel/wechatcom/wechatcomapp_channel.py

+ 6
- 5
channel/wechatcom/wechatcomapp_channel.py View File

@@ -162,11 +162,12 @@ class Query:
logger.debug("[wechatcom] receive message: {}, msg= {}".format(message, msg)) logger.debug("[wechatcom] receive message: {}, msg= {}".format(message, msg))
if msg.type == "event": if msg.type == "event":
if msg.event == "subscribe": 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: else:
try: try:
wechatcom_msg = WechatComAppMessage(msg, client=channel.client) wechatcom_msg = WechatComAppMessage(msg, client=channel.client)


Loading…
Cancel
Save