36 'header' =>
'Connection: close'
39 'header' =>
'Connection: close'
43 if(is_array($stream_context_params))
45 $ctx = array_merge_recursive($ctx, $stream_context_params);
61 $this->settings->getURL(
'Connect', $scope) .
'?id=' . $userId
75 $this->settings->getURL(
'Post', $scope) .
'?' .
$query
87 $this->settings->getURL(
'CreatePrivateRoom', $scope) .
'?' .
$query
99 $this->settings->getURL(
'EnterPrivateRoom', $scope) .
'?' .
$query
111 $this->settings->getURL(
'LeavePrivateRoom', $scope) .
'?' .
$query
125 $this->settings->getURL(
'Kick', $scope) .
'?' .
$query
149 $query = http_build_query(array(
'message' => $message) + $options);
151 return @json_decode($response);
164 $user_id = $chat_user->getUserId();
168 $room->inviteUserToPrivateRoom($invited_id, $scope);
169 $message = json_encode(array(
170 'type' =>
'private_room_created',
171 'users' => $invited_id,
172 'timestamp' => date(
'c'),
175 'proom_id' => $scope,
183 $this->
sendMessage($room->getRoomId(), $message, array(
'public' => 0,
'recipients' => $invited_id));
186 if($room->isSubscribed($user_id))
188 $message = json_encode(array(
189 'type' =>
'user_invited',
191 'proom_id' => $scope,
192 'inviter' => $inviter->
getId(),
193 'invited' => $invited_id
196 $this->
sendMessage($room->getRoomId(), $message, array(
'public' => 0,
'recipients' => $invited_id));
199 return array(
'success' =>
true,
'message' =>
'users invited');
217 $query = http_build_query($params);
219 $responseObject = json_decode($response);
220 $return = $responseObject;
221 if($responseObject->success ==
true)
223 $message = json_encode(array(
224 'type' =>
'private_room_created',
225 'timestamp' => date(
'c'),
228 'id' => $responseObject->id,
229 'proom_id' => $responseObject->id,
237 $params[
'sub'] = $responseObject->id;
239 $query = http_build_query($params);
244 $message = json_encode(array(
245 'type' =>
'private_room_entered',
247 'timestamp' => date(
'c'),
248 'sub' => $responseObject->id
252 return $responseObject;
261 $this->settings->getURL(
'Status', 0),
272 $responseObject = json_decode($response);
274 return $responseObject->success ==
true;
282 require_once
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
283 $settings = ilChatroomAdmin::getDefaultConfiguration()->getServerSettings();
285 return $connector->isServerAlive();