Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function getSingleRoom(string $token): DataResponse {
$includeLastMessage = !$isSIPBridgeRequest;

try {
$room = $this->manager->getRoomForUserByToken($token, $this->userId, $includeLastMessage);
$room = $this->manager->getRoomForUserByToken($token, $this->userId, $includeLastMessage, $isSIPBridgeRequest);

$participant = null;
try {
Expand Down
5 changes: 3 additions & 2 deletions lib/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,11 @@ public function getRoomForUser(int $roomId, ?string $userId): Room {
* @param string $token
* @param string|null $userId
* @param bool $includeLastMessage
* @param bool $isSIPBridgeRequest
* @return Room
* @throws RoomNotFoundException
*/
public function getRoomForUserByToken(string $token, ?string $userId, bool $includeLastMessage = false): Room {
public function getRoomForUserByToken(string $token, ?string $userId, bool $includeLastMessage = false, bool $isSIPBridgeRequest = false): Room {
$query = $this->db->getQueryBuilder();
$query->select('r.*')
->selectAlias('r.id', 'r_id')
Expand Down Expand Up @@ -441,7 +442,7 @@ public function getRoomForUserByToken(string $token, ?string $userId, bool $incl
$room->setParticipant($row['actor_id'], $this->createParticipantObject($room, $row));
}

if ($room->getType() === Room::PUBLIC_CALL) {
if ($isSIPBridgeRequest || $room->getType() === Room::PUBLIC_CALL) {
return $room;
}

Expand Down