Skip to content
This repository has been archived by the owner on Jun 1, 2020. It is now read-only.

Mini program not trigger message event #129

Closed
kis87988 opened this issue Aug 6, 2018 · 1 comment
Closed

Mini program not trigger message event #129

kis87988 opened this issue Aug 6, 2018 · 1 comment

Comments

@kis87988
Copy link

kis87988 commented Aug 6, 2018

Since next version create a new event room-invited, and this event filter out all app relate content.
puppet-padchat should create a type for mini-program because user can detect a mini-program type to do something about it.

NOTE: before room-invited came out, I can do /<appmsg appid=/gmi.test(content) && /@app/gmi.test(content) to detect mini-program and without filter out official account post in the message event.

Relate issue: wechaty/wechaty#1444

wechaty-puppet-padchat@0.9.13
Wechaty@0.19.123

Full Output Logs

$ docker create -t -i --name=$docker_name \
--mount type=bind,source="${dir}",target=/bot \
-e WECHATY_LOG=silly \
-e TZ="America/Los_Angeles" \
zixia/wechaty:latest mybot.ts
$ docker start -a $docker_name 
Show Logs

Paste the full output logs here with WECHATY_LOG=silly set

# PASTE FULL LOG OUTPUT AT HERE:
21:29:40 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"","data":"%5B%7B%22content%22%3A%22%3C%3Fxml+version%3D%5C%221.0%5C%22%3F%3E%5Cn%3Cmsg%3
21:29:40 VERB PuppetPadchat onPadchatMessage({id=377006112772186637, type=App(5)})
21:29:40 VERB PuppetPadchat onPadchatMessageRoomInvitation([object Object])
21:29:40 SILL PadchatRpc initHeartbeat() throttleQueue.subscribe(ws.on(message))
21:29:40 SILL PuppetPadchat startWatchdog() padchatManager.on(heartbeat)
21:29:40 SILL Wechaty memoryCheck() free: 96 MB, require: 4 MB
21:29:46 INFO PadchatRpc initHeartbeat() debounceQueue.subscribe(s%) WXSyncMessage timeout
21:29:46 SILL PadchatRpc initWebSocket() ws.on(pong)
21:29:46 SILL PadchatRpc initWebSocket() ws.on(pong)
21:29:59 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXSyncMessage","data":"%5B%7B%22content%22%3A%22%3C%3Fxml+version%3D%5C%221.0%5C%22%3F%3
21:29:59 SILL PadchatRpc initHeartbeat() throttleQueue.subscribe(ws.on(message))
21:29:59 SILL PuppetPadchat startWatchdog() padchatManager.on(heartbeat)
21:29:59 SILL Wechaty memoryCheck() free: 91 MB, require: 4 MB
21:29:59 SILL PadchatRpc WXSyncMessage result: [{"content":"<?xml version=\"1.0\"?>\n<msg>\n\t<appmsg appid=\"\" sdkver=\"0\">\n\t\t<title>知乎热榜</title>\n\t\t<des>知乎热榜</des>\n\t\t<action />\n\t\t<type>33</type>\n\t\t<showtype>0</showtype>\n\t\t<soundtype>0</soundtype>\n\t\t<mediatagname />\n\t\t<messageext />\n\t\t<messageaction />\n\t\t<content />\n\t\t<contentattr>0</contentattr>\n\t\t<url>https://mp.weixin.qq.com/mp/waerrpage?appid=wxeb39b10e39bf6b54&amp;type=upgrade&amp;upgradetype=3#wechat_redirect</url>\n\t\t<lowurl />\n\t\t<dataurl />\n\t\t<lowdataurl />\n\t\t<appattach>\n\t\t\t<totallen>0</totallen>\n\t\t\t<attachid />\n\t\t\t<emoticonmd5 />\n\t\t\t<fileext />\n\t\t\t<cdnthumburl>3050020100044930470201000204af13b17c020310d95f020431c1cdcb02045b67ceb40422777869645f6231396e6269396f716b70673132333235305f313533333532393737390204010c00030201000400</cdnthumburl>\n\t\t\t<cdnthumbmd5>b2d915081e8836214837bc11dd3fb05b</cdnthumbmd5>\n\t\t\t<cdnthumblength>424903</cdnthumblength>\n\t\t\t<cdnthumbwidth>750</cdnthumbwidth>\n\t\t\t<cdnthumbheight>1206</cdnthumbheight>\n\t\t\t<cdnthumbaeskey>6bbf025afcec4721869daf10651e2f97</cdnthumbaeskey>\n\t\t\t<aeskey>6bbf025afcec4721869daf10651e2f97</aeskey>\n\t\t\t<encryver>0</encryver>\n\t\t\t<filekey>wxid_b19nbi9oqkpg123250_1533529779</filekey>\n\t\t</appattach>\n\t\t<extinfo />\n\t\t<sourceusername>gh_bc33767b4df6@app</sourceusername>\n\t\t<sourcedisplayname>知乎热榜</sourcedisplayname>\n\t\t<thumburl />\n\t\t<md5 />\n\t\t<statextstr />\n\t\t<weappinfo>\n\t\t\t<username><![CDATA[gh_bc33767b4df6@app]]></username>\n\t\t\t<appid><![CDATA[wxeb39b10e39bf6b54]]></appid>\n\t\t\t<type>2</type>\n\t\t\t<version>39</version>\n\t\t\t<weappiconurl><![CDATA[http://mmbiz.qpic.cn/mmbiz_png/BtjRmPvhnt8xoqVlKxOLUibV2VYMvvCIuO0pJsV0xGSh8HyibfnibA0cdzeZyTEFn4epHa7ggLnt6elEONjvjH3Kg/0?wx_fmt=png]]></weappiconurl>\n\t\t\t<pagepath><![CDATA[pages/index/index.html]]></pagepath>\n\t\t\t<shareId><![CDATA[0_wxeb39b10e39bf6b54_2937303420_1533529776_0]]></shareId>\n\t\t\t<appservicetype>0</appservicetype>\n\t\t</weappinfo>\n\t</appmsg>\n\t<fromusername>a38372624</fromusername>\n\t<scene>0</scene>\n\t<appinfo>\n\t\t<version>1</version>\n\t\t<appname></appname>\n\t</appinfo>\n\t<commenturl></commenturl>\n</msg>\n","continue":1,"description":"You've received a message","from_user":"a38372624","msg_id":"377006112772186637","msg_source":"<msgsource />\n","msg_type":5,"status":1,"sub_type":49,"timestamp":1533529780,"to_user":"wxid_b19nbi9oqkpg12","uin":488036821}]
21:30:19 SILL PadchatRpc initHeartbeat() debounceQueue.subscribe(ws.on(message))

@kis87988
Copy link
Author

Test. and it can be trigger after v0.9.26.
refer to commit#a2cc86f

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant