ChatRoomTrait
trait ChatRoomTrait (View source)
聊天室
Methods
array
chatRoomCreate(string $creator, string $name, string $announcement, string $broadcastUrl, array $ext = [])
创建聊天室
array
chatRoomGet(int $roomid, bool $needOnlineUserCount = false)
查询聊天室信息
array
chatRoomGetBatch(array $roomids, bool $needOnlineUserCount = false)
批量查询聊天室信息
array
chatRoomUpdate(int $roodId, string $name = '', string $announcement = '', string $broadcastUrl = '', array $ext = [], bool $needNotify = true, array $notifyExt = [])
更新聊天室信息
array
chatRoomToggleCloseStatus(int $roomid, string $operator, bool $valid)
修改聊天室开/关闭状态
array
chatRoomSetMemberRole(int $roomid, string $operator, string $target, string $opt, bool $optValue, array $notifyExt = [])
设置聊天室内用户角色
array
chatRoomRequestAddress(int $roomid, string $accId, int $clientType = null)
请求聊天室地址与令牌
array
chatRoomSendMsg(int $roomid, string $msgId, string $fromAccId, int $msgType = null, int $resendFlag = 0, array $attach = [], array $ext = [], bool $highPriority = false)
发送聊天室消息
array
chatRoomSendTxtMessage(int $roomid, string $msgId, string $fromAccId, string $msg, int $resendFlag = 0, array $ext = [])
发送聊天室文字消息封装
array
chatRoomAddRobot(int $roomid, array $accIds, array $roleExt = [], array $notifyExt = [])
往聊天室内添加机器人,机器人过期时间为24小时。
array
chatRoomRemoveRobot(int $roomid, array $accIds)
从聊天室内删除机器人
array
chatRoomTemporaryMute(int $roomid, string $operator, string $target, string $muteDuration, bool $needNotify = true, array $notifyExt = [])
将聊天室内成员设置为临时禁言
array|bool
chatRoomQueueOffer(int $roomid, string $key, string $value, string $operator = null, string $transient = null)
往聊天室有序队列中新加或更新元素
array
chatRoomQueuePoll(int $roomid, string $key)
从队列中取出元素
array
chatRoomQueueList(int $roomid)
排序列出队列中所有元素
array|bool
chatRoomQueueDrop(int $roomid)
删除清理整个队列
bool|array
chatRoomQueueInit(int $roomid, int $sizeLimit)
初始化队列
array|bool
chatRoomMuteRoom(int $roomid, string $operator, bool $mute = false, bool $needNotify = true, string $notifyExt = '')
设置聊天室整体禁言状态(仅创建者和管理员能发言)
array
chatRoomTopn(int $topn = 100, int $timestamp = null, string $period = 'day', string $orderby = 'active')
查询聊天室统计指标TopN
array
chatRoomMembersByPage(int $roomid, int $type = 0, int $endtime = 0, int $limit = 100)
分页获取成员列表
array
chatRoomQueryMembers(int $roomid, array $accids)
批量获取在线成员信息
array|bool
chatRoomUpdateMyRoomRole(int $roomid, string $accid, bool $save = false, bool $needNotify = false, string $notifyExt = '', string $nick = '', string $avator = '', string $ext = '')
变更聊天室内的角色信息
array
chatRoomQueueBatchUpdateElements(int $roomid, string $operator, array $elements, bool $needNotify = true, string $notifyExt = '')
批量更新聊天室队列元素
array
chatRoomQueryUserRoomIds(string $creator)
查询用户创建的开启状态聊天室列表
Details
at line 68
array
chatRoomCreate(string $creator, string $name, string $announcement, string $broadcastUrl, array $ext = [])
创建聊天室
at line 91
array
chatRoomGet(int $roomid, bool $needOnlineUserCount = false)
查询聊天室信息
at line 108
array
chatRoomGetBatch(array $roomids, bool $needOnlineUserCount = false)
批量查询聊天室信息
at line 132
array
chatRoomUpdate(int $roodId, string $name = '', string $announcement = '', string $broadcastUrl = '', array $ext = [], bool $needNotify = true, array $notifyExt = [])
更新聊天室信息
at line 166
array
chatRoomToggleCloseStatus(int $roomid, string $operator, bool $valid)
修改聊天室开/关闭状态
at line 204
array
chatRoomSetMemberRole(int $roomid, string $operator, string $target, string $opt, bool $optValue, array $notifyExt = [])
设置聊天室内用户角色
at line 237
array
chatRoomRequestAddress(int $roomid, string $accId, int $clientType = null)
请求聊天室地址与令牌
at line 272
array
chatRoomSendMsg(int $roomid, string $msgId, string $fromAccId, int $msgType = null, int $resendFlag = 0, array $attach = [], array $ext = [], bool $highPriority = false)
发送聊天室消息
at line 311
array
chatRoomSendTxtMessage(int $roomid, string $msgId, string $fromAccId, string $msg, int $resendFlag = 0, array $ext = [])
发送聊天室文字消息封装
at line 340
array
chatRoomAddRobot(int $roomid, array $accIds, array $roleExt = [], array $notifyExt = [])
往聊天室内添加机器人,机器人过期时间为24小时。
at line 362
array
chatRoomRemoveRobot(int $roomid, array $accIds)
从聊天室内删除机器人
at line 386
array
chatRoomTemporaryMute(int $roomid, string $operator, string $target, string $muteDuration, bool $needNotify = true, array $notifyExt = [])
将聊天室内成员设置为临时禁言
at line 413
array|bool
chatRoomQueueOffer(int $roomid, string $key, string $value, string $operator = null, string $transient = null)
往聊天室有序队列中新加或更新元素
at line 436
array
chatRoomQueuePoll(int $roomid, string $key)
从队列中取出元素
at line 455
array
chatRoomQueueList(int $roomid)
排序列出队列中所有元素
at line 470
array|bool
chatRoomQueueDrop(int $roomid)
删除清理整个队列
at line 487
bool|array
chatRoomQueueInit(int $roomid, int $sizeLimit)
初始化队列
at line 510
array|bool
chatRoomMuteRoom(int $roomid, string $operator, bool $mute = false, bool $needNotify = true, string $notifyExt = '')
设置聊天室整体禁言状态(仅创建者和管理员能发言)
at line 535
array
chatRoomTopn(int $topn = 100, int $timestamp = null, string $period = 'day', string $orderby = 'active')
查询聊天室统计指标TopN
at line 559
array
chatRoomMembersByPage(int $roomid, int $type = 0, int $endtime = 0, int $limit = 100)
分页获取成员列表
at line 581
array
chatRoomQueryMembers(int $roomid, array $accids)
批量获取在线成员信息
at line 607
array|bool
chatRoomUpdateMyRoomRole(int $roomid, string $accid, bool $save = false, bool $needNotify = false, string $notifyExt = '', string $nick = '', string $avator = '', string $ext = '')
变更聊天室内的角色信息
at line 636
array
chatRoomQueueBatchUpdateElements(int $roomid, string $operator, array $elements, bool $needNotify = true, string $notifyExt = '')
批量更新聊天室队列元素
at line 658
array
chatRoomQueryUserRoomIds(string $creator)
查询用户创建的开启状态聊天室列表