wechaty / puppet-wechat

Wechaty Puppet Provider for WeChat
https://www.npmjs.com/package/wechaty-puppet-wechat
Apache License 2.0
405 stars 67 forks source link

Fix attachment type (#175) #184

Closed System233 closed 2 years ago

System233 commented 2 years ago

Fix #175 ref #178

Sorry about that, #178 cannot be opened again.

huan commented 2 years ago

It is not a best practice for using force push when updating the PR.

I have pushed some modifications in this PR and has just been overwritten by your force push.

System233 commented 2 years ago

It is not a best practice for using force push when updating the PR.

I have pushed some modifications in this PR and has just been overwritten by your force push.

Sorry, I am merging commits to make diff clearer.

System233 commented 2 years ago

Thanks for your advice and help. In real device test process, the patch works correctly, but sometimes getaddrinfo ENOTFOUND exception occurs, it may another string concat error.

Error: getaddrinfo ENOTFOUND wx2.qq.comundefined
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)

image

Probably wx2.qq.comundefined comes from here: https://github.com/wechaty/puppet-wechat/blob/1442099e5cbf107d97f11e99f3dee2e793260aa8/src/puppet-wechat.ts#L1348-L1352

huan commented 2 years ago

Thank you very much for sending this PR for fixing the attachments sending bug!

The code will be published on wechaty-puppet-wechat@1.11.3 or above versions.

huan commented 2 years ago

BTW: this PR reverted some changes from #106 made by @su-chang

I'd like to suggest @su-chang review the code and make sure the new modification is the right way to improve the old PR.