查询被禁言聊天室成员 方法
@param $chatroomId 聊天室 Id。（必传）
@return mixed
550619
public function chatroomUserGagList($chatroomId) {
        try{
            if(empty($chatroomId))
                throw new Exception('聊天室 Id 不能为空');
            $params['chatroomId'] = $chatroomId;
            $ret = $this->curl('/chatroom/user/gag/list',$params);
            if(empty($ret))
                throw new Exception('请求失败');
            return $ret;
        }catch (Exception $e) {
            print_r($e->getMessage());
        }
    }
134525
public function roomEdit($room_id, $room_name = "", $room_description = "", $max_user = 0)
    {
        $url    = $this->url.'chatgroups/'.$room_id;
        $option = [
            "name"        => self::stringReplace($room_name),
            "description" => self::stringReplace($room_description),
            "maxusers"    => $max_user,
        ];
        $option = array_filter($option);
        if (empty($option)) {
            throw new EasemobError('提交修改的参数，不修改提交空！');
        }

        $access_token = $this->getToken();
        $header []    = 'Authorization: Bearer '.$access_token;

        return Http::postCurl($url, $option, $header, 'PUT');
    }
973786
public Response deleteMember(String roomName, String jid) {
		return restClient.delete("chatrooms/" + roomName + "/members/" + jid,
				new HashMap<String, String>());
	}
1266115
private function removeInlineKeyboard($chatId, $messageId)
    {
        $parameters = [
            'chat_id' => $chatId,
            'message_id' => $messageId,
            'inline_keyboard' => [],
        ];

        return $this->http->post($this->buildApiUrl('editMessageReplyMarkup'), [], $parameters);
    }
946579
public function update($chatId, $opUser, array $chatInfo = [])
    {
        $params = array_merge($chatInfo, [
            'chatid'  => $chatId,
            'op_user' => $opUser,
        ]);

        return $this->parseJSON('json', [self::API_UPDATE, $params]);
    }
1078516
private function getFolderById(int $folderId): \stdClass
    {
        $folder = Craft::$app->assets->getFolderById($folderId);
        if ($folder) {
            $volume = $folder->getVolume();
            return  (object) [
                'id' => $folderId,
                'handle' => $volume->handle
            ];
        }
        return null;
    }
355561
public function room($room_id)
    {
        $url          = $this->url.'chatrooms/'.$room_id;
        $option       = [];
        $access_token = $this->getToken();
        $header []    = 'Authorization: Bearer '.$access_token;

        return Http::postCurl($url, $option, $header, 'GET');
    }
811274
public function create($chatid, $name, $owner, $userlist)
    {
        $params = array(
            'chatid' => $chatid,
            'name' => $name,
            'owner' => $owner,
            'userlist' => $userlist
        );

        $response = $this->http->jsonPost(self::API_CREATE, $params);

        return $response;
    }
382800
public function getDepartmentList($id = null)
    {
        $result = $this->httpGet(self::WECHAT_DEPARTMENT_LIST, [
            'access_token' => $this->getAccessToken(),
        ] + ($id === null ? [] : [
            'id' => $id
        ]));
        // $this->dump($result);die();
        return isset($result['errmsg']) && $result['errmsg'] == 'ok' ? $result['department'] : $this->dump($result);
    }
475046
protected static function get_chat_ids_to_cmids_from_cmids(array $cmids) {
        global $DB;
        list($insql, $inparams) = $DB->get_in_or_equal($cmids, SQL_PARAMS_NAMED);
        $sql = "
            SELECT c.id, cm.id AS cmid
              FROM {chat} c
              JOIN {modules} m
                ON m.name = :chat
              JOIN {course_modules} cm
                ON cm.instance = c.id
               AND cm.module = m.id
             WHERE cm.id $insql";
        $params = array_merge($inparams, ['chat' => 'chat']);
        return $DB->get_records_sql_menu($sql, $params);
    }
107142
def chat_search(self, room_id, search_text, **kwargs):
        """"""
        return self.__call_api_get('chat.search', roomId=room_id, searchText=search_text, kwargs=kwargs)
1008873
public function listUser($appId, $roomName)
    {
        $url = sprintf("%s/%s/rooms/%s/users", $this->baseURL, $appId, $roomName);
        $ret  = $this->get($url);
        return $ret;
    }
1344078
public function getConversationMessageById($conversationId)
    {
        if ($this->conversation->checkUserExist($this->userId, $conversationId)) {
            $channel = $this->getChannelName($conversationId, 'chat_room');

            return $this->conversation->getConversationMessageById($conversationId, $this->userId, $channel);
        }

        abort(404);
    }
631901
public function ChatID()
    {
        $type = $this->getUpdateType();
        if ($type == self::CALLBACK_QUERY) {
            return @$this->data['callback_query']['message']['chat']['id'];
        }
        if ($type == self::CHANNEL_POST) {
            return @$this->data['channel_post']['chat']['id'];
        }
        if ($type == self::EDITED_MESSAGE) {
            return @$this->data['edited_message']['chat']['id'];
        }
        if ($type == self::INLINE_QUERY) {
            return @$this->data['inline_query']['from']['id'];
        }

        return $this->data['message']['chat']['id'];
    }
50523
public function getKFSession($openid)
    {
        if (!$this->access_token && !$this->getAccessToken()) {
            return false;
        }
        $result = Tools::httpGet(self::API_BASE_URL_PREFIX . self::CUSTOM_SESSION_GET . "access_token={$this->access_token}" . '&openid=' . $openid);
        if ($result) {
            $json = json_decode($result, true);
            if (empty($json) || !empty($json['errcode'])) {
                $this->errCode = isset($json['errcode']) ? $json['errcode'] : '505';
                $this->errMsg = isset($json['errmsg']) ? $json['errmsg'] : '无法解析接口返回内容！';
                return $this->checkRetry(__FUNCTION__, func_get_args());
            }
            return $json;
        }
        return false;
    }
408794
public function getGroupConversationMessageById($groupConversationId)
    {
        if ($this->group->checkUserExist($this->userId, $groupConversationId)) {
            $channel = $this->getChannelName($groupConversationId, 'group_chat_room');

            return $this->group->getGroupConversationMessageById($groupConversationId, $channel);
        }

        abort(404);
    }
789459
private function usersInChat($users, Chat $chat) {
        $chatMembers=$chat->getChatMembers();
        $chatMembers->initialize();
        return $chatMembers->count() == count($users)
            && $chatMembers->forAll(function($index, $user) use ($users){
                return in_array($user, $users);
            });
    }