Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-07-06 15:46:17 +02:00
Родитель b274441c61
Коммит f0b4517bd3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: E166FD8976B3BAC8
3 изменённых файлов: 25 добавлений и 25 удалений

Просмотреть файл

@ -70,7 +70,7 @@ return [
],
],
[
'name' => 'Call#joinRoom',
'name' => 'Call#joinCall',
'url' => '/api/{apiVersion}/room/{token}/join',
'verb' => 'POST',
'requirements' => [
@ -88,7 +88,7 @@ return [
],
],
[
'name' => 'Call#leave',
'name' => 'Call#leaveCall',
'url' => '/api/{apiVersion}/leave',
'verb' => 'DELETE',
'requirements' => ['apiVersion' => 'v1'],
@ -143,7 +143,7 @@ return [
],
],
[
'name' => 'Room#leaveRoom',
'name' => 'Room#removeSelfFromRoom',
'url' => '/api/{apiVersion}/room/{roomId}',
'verb' => 'DELETE',
'requirements' => [

Просмотреть файл

@ -273,25 +273,6 @@ class CallController extends OCSController {
return new DataResponse($result);
}
/**
* @PublicPage
*
* @param string $token
* @return DataResponse
*/
public function ping($token) {
try {
$room = $this->manager->getRoomForParticipantByToken($token, $this->userId);
} catch (RoomNotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
$sessionId = $this->session->get('spreed-session');
$room->ping($this->userId, $sessionId, time());
return new DataResponse();
}
/**
* @PublicPage
* @UseSession
@ -299,7 +280,7 @@ class CallController extends OCSController {
* @param string $token
* @return DataResponse
*/
public function joinRoom($token) {
public function joinCall($token) {
try {
$room = $this->manager->getRoomForParticipantByToken($token, $this->userId);
} catch (RoomNotFoundException $e) {
@ -325,13 +306,32 @@ class CallController extends OCSController {
]);
}
/**
* @PublicPage
*
* @param string $token
* @return DataResponse
*/
public function ping($token) {
try {
$room = $this->manager->getRoomForParticipantByToken($token, $this->userId);
} catch (RoomNotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
$sessionId = $this->session->get('spreed-session');
$room->ping($this->userId, $sessionId, time());
return new DataResponse();
}
/**
* @PublicPage
* @UseSession
*
* @return DataResponse
*/
public function leave() {
public function leaveCall() {
if ($this->userId !== null) {
$this->manager->disconnectUserFromAllRooms($this->userId);
} else {

Просмотреть файл

@ -238,7 +238,7 @@ class RoomController extends OCSController {
* @param int $roomId
* @return DataResponse
*/
public function leaveRoom($roomId) {
public function removeSelfFromRoom($roomId) {
try {
$room = $this->manager->getRoomForParticipant($roomId, $this->userId);
} catch (RoomNotFoundException $e) {