feat: 添加云信群组api
This commit is contained in:
@ -740,19 +740,23 @@ func (client *ImClient) CreateChatGroup(ctx context.Context, ownerUserId string,
|
||||
// 建群成功会返回 tid,网易云信服务器产生,群唯一标识,该字段需要保存,以便于加人与踢人等后续操作。
|
||||
// 如果创建时邀请的成员中存在加群数量超过限制的情况,会返回 faccid(加群失败成员的 IM 账号)。
|
||||
// 每个用户可创建的群数量有限制,限制值由 IM 套餐的群组配置决定,具体可前往 网易云信控制台 查看。
|
||||
func (client *ImClient) CreateProGroup(tname, owner, announcement, avatar string) (string, error) {
|
||||
func (client *ImClient) CreateProGroup(tname, owner, announcement, avatar, msg string) (string, error) {
|
||||
url := "https://api.netease.im/nimserver/team/create.action"
|
||||
httpMethod := common.HTTP_METHOD_POST
|
||||
header := client.generateHeader()
|
||||
sb := HyTools.NewStringBuilder()
|
||||
sb.Append("tname=" + tname)
|
||||
sb.Append("&")
|
||||
sb.Append("owner=owner")
|
||||
sb.Append("owner=" + owner)
|
||||
sb.Append("&")
|
||||
sb.Append("announcement=" + announcement)
|
||||
sb.Append("&")
|
||||
sb.Append("msg=" + msg)
|
||||
sb.Append("&")
|
||||
sb.Append("icon=" + avatar)
|
||||
sb.Append("&")
|
||||
sb.Append("members=[]")
|
||||
sb.Append("&")
|
||||
sb.Append("joinmode=" + "0")
|
||||
sb.Append("&")
|
||||
sb.Append("invitemode=" + "1") // 邀请权限,即谁可以邀请他人入群0,群主和管理员(默认)。1,所有人
|
||||
|
||||
Reference in New Issue
Block a user