Skip to content

[BUG] 直接给用户发信息, 报这样的错误 #34

@fanqingshxu

Description

@fanqingshxu

OpenIM Server Version

e.g.3.8.0

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

开发的是小程序, 在开发中发现

在给用户发信息时, 如果和用户还一条信息都没有产生时, 发信息时报10006

如果先在server端用api的方式,给用户发一条信息,产生了会话, 发信息过程又是正常的

function sendMessage() { uni.$openIM.createTextMessage(text.value).then(({ data }) => { console.log('创建消息成功', data); console.log('popupUserInfo.value.id:', popupUserInfo.value.id) uni.$openIM.sendMessage({ recvID: popupUserInfo.value.id, message: data }).then(({ data }) => { console.log('Message sent successfully', data); messageList.messages.push(data); scrollToBottom(); text.value = ''; }).catch(({ errCode, errMsg }) => { console.log('Failed to send message', errCode, errMsg); }); }).catch(({ errCode, errMsg }) => { console.log('Failed to send message', errCode, errMsg); }); }

Screenshots Link

下面是开发中的截图

https://ykx-1254116920.cos.ap-nanjing.myqcloud.com/tmp/WechatIMG634.jpg
https://ykx-1254116920.cos.ap-nanjing.myqcloud.com/tmp/WechatIMG638.jpg
https://ykx-1254116920.cos.ap-nanjing.myqcloud.com/tmp/WechatIMG639.jpg
https://ykx-1254116920.cos.ap-nanjing.myqcloud.com/tmp/WechatIMG642.jpg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions