-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message type: mini program for Message.type() #1444
Comments
Do you have any suggestions about this, for example:
|
currently, I check the content using |
Is there any ROBUST way for us to get to know the message is a mini-program I think it depends on the What should the MessageType name be used for MiniProgram? I think it's better be called MiniApp, as what And I agreed that they should better be filtered out. Further, I'm writing a filter to decode them, so leaving them as normal messages works best for me though: const wxmsg = '<msg><appmsg appid="" sdkver="0"><title>中国房价暴涨和中美贸易战的深层关系</title><des>本文原作是知乎的“奶包的大叔”在中国,2018刚刚进入5月,全国各地发布的...</des><action></action><type>5</type>'
wxmsg.replace(/.*><title>(.*)<\/title><des>(.*)<\/des><.*/, "Title: $1\nDesc: $2\n")
// ->
Title: 中国房价暴涨和中美贸易战的深层关系
Desc: 本文原作是知乎的“奶包的大叔”在中国,2018刚刚进入5月,全国各地发布的... |
In the payload data of the APP message, there is a type field in the xml. It should be possible to distinguish the app message by type is URL/miniProgram/redpack/transfer, etc. The type field of the miniProgram is 36, and the type of the URL is 5. |
Actually, I forgot to close this issue because the Padchat now is support. Refer to wechaty/wechaty-puppet-padchat#129. |
Provide Your Network Information
docker
Expected behavior
Message.type() should have type check for mini program.
Actual behavior
Not implement yet
Steps to reproduce the behavior (and fixes, if any)
right now, I use regex to check content
Full Output Logs
$ WECHATY_LOG=silly npm run ts-node mybot.ts # or $ WECHATY_LOG=silly node dist/mybot.js
Show Logs
Paste the full output logs here with
WECHATY_LOG=silly
setThe text was updated successfully, but these errors were encountered: