webim--Group Chat

Source: Internet
Author: User

Port 1: Create a group
Step 1): Create a group

Interface format
Description: Required parameter, parameter is Object . For example, provide "{}" or "{success:}" callback function can be , if not provided, error! However, the callback function is useless, and the function inside the callback function is not executed at all. Execution results have a return value, return a random string , useless!
var ret = conn.createroompres ({success:function (data) {Console.log (data)}})

Print
RET is:
"Webim_63953695"
The following two kinds of calling interface JS code are correct, the parameters must be an object. :
Conn.createroompres ({})
Conn.createroompres ({success:function (data) {Console.log (data)}})
Returns the result asChat-ui.jsIn the Handlegroupchat (message), whereMessage ObjectThe format is as follows:
{"type": "Groupchat", "from": "05288893869199846298#appkey@conference. li726-26/+8615912341013_3398351031 ","To ": "+8615912341013_3398351031", "Msgbody": {"type": "Groupchat","Item": {"Jid": "[email Protected]/smack","affiliation": "Owner", "Role": "Moderator"}, "code": ["110", "100", "201"]}}
Description: In the item"Affiliation": "Owner", "Role": "Moderator", indicating that this is aBuild a groupThe Operation! Returned byGroup numberIs in the From field "05288893869199846298#appkey"

Step 2): When creating, join a group member

webim--Group Chat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.