quickblox for web - create 1 to 1 chat

后端 未结 3 900
执笔经年
执笔经年 2021-01-16 08:20

I am trying to create 1 to 1 chat from a web client.

I downloaded the SDK and the group chat example. There seem to be really good examples for all platforms except

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-16 09:17

    I suggest that you might see the 405 error because you have put the call of sendMessage function immediately after the call of connectChat function.

    To connect to the chat needs some time, so you can not send the message until your client (browser) hasn't finished the connecting to the chat server at first. You need to put the call of sendMessage function in callback from function connectChat where a status is "Connected". Or you can perform sendMessage function on an onclick event to the tag

提交回复
热议问题