juzibot / donut-tester

40 stars 4 forks source link

Quoted text message type error: Unknown #78

Open huan opened 3 years ago

huan commented 3 years ago

When the bot received a quoted message, the message type is Text before, and it seems changed to be Unknown now.

image

14:21:06 INFO WechatyPluginContrib EventLogger message: Message#Unknown[🗣Contact<Huan (李卓桓)>@👥Room<ChatOps - Friday BOT>]   <?xml version="1.0"?>
<msg>
        <appmsg appid="" sdkver="0">
                <title>Tes

This is a breaking change for our Friday.BOT because it can not forward quoted messages in rooms because of this change.

huan commented 3 years ago

Do we need a new Message.Type for quote message? Because it should contains another message is which is quoted.

huan commented 3 years ago

ping

Could we have a look on this issue?

We can not deal with QuotaMessage if we do not resolve this issue.

suntong commented 3 years ago

Came here to report the same problem and found it has already been reported.

This change happened recently, within donut. On Jan 31, 2021, when I was using the older donut version, it was still working fine, with the format of:

Quoted message
- - - - - - - - - - - - - - - - 
New message

Do we need a new Message.Type

I think the above format look good, no special handing. Else, everyone has to change their code, just to hand things that had been working before.

Could we have a look on this issue?

Yes, please!! Here is the full xml string

<?xml version="1.0"?>
<msg>
        <appmsg appid="" sdkver="0">
                <title>再测试</title>
                <des />
                <username />
                <action>view</action>
                <type>57</type>
                <showtype>0</showtype>
                <content />
                <url />
                <lowurl />
                <dataurl />
                <lowdataurl />
                <contentattr>0</contentattr>
                <streamvideo>
                        <streamvideourl />
                        <streamvideototaltime>0</streamvideototaltime>
                        <streamvideotitle />
                        <streamvideowording />
                        <streamvideoweburl />
                        <streamvideothumburl />
                        <streamvideoaduxinfo />
                        <streamvideopublishid />
                </streamvideo>
                <canvasPageItem>
                        <canvasPageXml><![CDATA[]]></canvasPageXml>
                </canvasPageItem>
                <refermsg>
                        <type>1</type>
                        <svrid>4954039493626319649</svrid>
                        <fromusr>wxid_dt09...v22</fromusr>
                        <chatusr>wxid_dt09...v22</chatusr>
                        <displayname>wxid_displayname</displayname>
                        <msgsource />
                        <content>测试</content>
                </refermsg>
                <appattach>
                        <totallen>0</totallen>
                        <attachid />
                        <cdnattachurl />
                        <emoticonmd5 />
                        <aeskey />
                        <fileext />
                        <islargefilemsg>0</islargefilemsg>
                </appattach>
                <extinfo />
                <androidsource>0</androidsource>
                <thumburl />
                <mediatagname />
                <messageaction><![CDATA[]]></messageaction>
                <messageext><![CDATA[]]></messageext>
                <emoticongift>
                        <packageflag>0</packageflag>
                        <packageid />
                </emoticongift>
                <emoticonshared>
                        <packageflag>0</packageflag>
                        <packageid />
                </emoticonshared>
                <designershared>
                        <designeruin>0</designeruin>
                        <designername>null</designername>
                        <designerrediretcturl>null</designerrediretcturl>
                </designershared>
                <emotionpageshared>
                        <tid>0</tid>
                        <title>null</title>
                        <desc>null</desc>
                        <iconUrl>null</iconUrl>
                        <secondUrl>null</secondUrl>
                        <pageType>0</pageType>
                </emotionpageshared>
                <webviewshared>
                        <shareUrlOriginal />
                        <shareUrlOpen />
                        <jsAppId />
                        <publisherId />
                </webviewshared>
                <template_id />
                <md5 />
                <weappinfo>
                        <username />
                        <appid />
                        <appservicetype>0</appservicetype>
                        <videopageinfo>
                                <thumbwidth>0</thumbwidth>
                                <thumbheight>0</thumbheight>
                                <fromopensdk>0</fromopensdk>
                        </videopageinfo>
                </weappinfo>
                <statextstr />
                <musicShareItem>
                        <musicDuration>0</musicDuration>
                </musicShareItem>
                <findernamecard>
                        <username />
                        <avatar><![CDATA[]]></avatar>
                        <nickname />
                        <auth_job />
                        <auth_icon>0</auth_icon>
                        <auth_icon_url />
                </findernamecard>
                <finderEndorsement>
                        <scene><![CDATA[0]]></scene>
                </finderEndorsement>
                <directshare>0</directshare>
                <gamecenter>
                        <namecard>
                                <iconUrl />
                                <name />
                                <desc />
                                <tail />
                                <jumpUrl />
                        </namecard>
                </gamecenter>
                <patMsg>
                        <chatUser>null</chatUser>
                        <records>
                                <recordNum>0</recordNum>
                        </records>
                </patMsg>
                <websearch>
                        <rec_category>0</rec_category>
                        <channelId>0</channelId>
                </websearch>
        </appmsg>
        <fromusername>wxid_dt09...v22</fromusername>
        <scene>0</scene>
        <appinfo>
                <version>1</version>
                <appname></appname>
        </appinfo>
        <commenturl></commenturl>
</msg>