Thanks for this great demo for Wechaty Puppet SimplePad!
I'd like to suggest that we should improve the QRCode part of the codes for the puppet because the puppet spec needs to use the QR Code value instead of the image to make the Wechaty user experience to be consist.
The FileBox has a great support for this case:
const fileBox = FileBox.fromBase64('BASE64XXX')
const qrCodeValue = await fileBox.toQRCode()
console.log(`QR Code decoded value is: "${qrCodeValue}"`)
// Output: QR Code decoded value is: "https://github.com"
So my suggestions are to change your puppet implementation and include the above code so that we can expect the Wechaty will be always emitting a QR Code value to the end user.
Hi chatrbot,
Thanks for this great demo for Wechaty Puppet SimplePad!
I'd like to suggest that we should improve the QRCode part of the codes for the puppet because the puppet spec needs to use the QR Code value instead of the image to make the Wechaty user experience to be consist.
The
FileBox
has a great support for this case:See: https://github.com/huan/file-box#27-toqrcode-promisestring
So my suggestions are to change your puppet implementation and include the above code so that we can expect the Wechaty will be always emitting a QR Code value to the end user.
https://github.com/chatrbot/wechaty-puppet-simplepad-demo/blob/0df2a622bc6799f4d7509a0db7a6feabc09006c0/bot.ts#L36