message-phonegap-plugin 在ionic3中调用JMessage.createConversation 出错

jmessage
标签: #<Tag:0x00007fb846981678>

(Log) #1

错误信息为:can’t create the conversation,please check your parameters


(Log) #2
this.JMessage.createConversation({ type: 'single', username: this.userobj.username })
    .then((conversation)=>{
      alert("聊天对象:"+JSON.stringify(conversation));
      console.log(conversation);
        this.JMessage.sendTextMessage({ type: 'single', username: this.userobj.username,
        text: '发送消息测试'})
        .then((msg) =>{
          alert("发消息:"+JSON.stringify(msg));
        })
        .catch((error) =>{
          // var code = error.code
          var desc = error.description
          alert("消息错误:"+desc);
        });
    })
    .catch((error) =>{
      var code = error.code;
      var desc = error.description;
      alert(code+"错误聊天对象 : "+desc);
    });

这是测试代码


(Josh Lipan) #3

Android还是ios报错?抓原生log


#4

根据错误信息来看,是你传参有误,提供下完整的客户端日志