js-realtime-sdk icon indicating copy to clipboard operation
js-realtime-sdk copied to clipboard

TypeError: [object Object] is not a Message

Open hzuhyb opened this issue 5 years ago • 0 comments

const file = new AV.File.withURL('萌妹子', \'http://pic2.zhimg.com/6c10e6053c739ed0ce676a0aff15cf1c.gif') file.save().then(async () => { const imgMessage = new ImageMessage(file) imgMessage.setAttributes({ size: data.size }) const message = await conversation.send(imgMessage) console.log('发送成功', message) }).then(() => { console.log('文件发送成功') }).catch(console.error.bind(console))

Execute the above methods to get an error:

image

  • react-native: 0.63.2
  • leancloud-realtime: 5.0.0-rc.3
  • leancloud-realtime-plugin-typed-messages: 3.1.0
  • leancloud-storage: 4.6.1

hzuhyb avatar Sep 25 '20 11:09 hzuhyb