зеркало из https://github.com/nextcloud/spreed.git
Make the methods public so the callables work
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
b88394f265
Коммит
eab0a9059d
|
@ -60,7 +60,7 @@ class RemoveEmptyRooms extends TimedJob {
|
|||
}
|
||||
}
|
||||
|
||||
protected function callback(Room $room) {
|
||||
public function callback(Room $room) {
|
||||
if ($room->getType() === Room::ONE_TO_ONE_CALL && $room->getNumberOfParticipants(false) <= 1) {
|
||||
$room->deleteRoom();
|
||||
$this->numDeletedRooms++;
|
||||
|
|
|
@ -26,7 +26,6 @@ use OCA\Spreed\Exceptions\ParticipantNotFoundException;
|
|||
use OCA\Spreed\Manager;
|
||||
use OCA\Spreed\Room;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\ILogger;
|
||||
|
||||
/**
|
||||
* Class ResetInCallFlags
|
||||
|
@ -54,7 +53,7 @@ class ResetInCallFlags extends TimedJob {
|
|||
$this->manager->forAllRooms([$this, 'callback']);
|
||||
}
|
||||
|
||||
protected function callback(Room $room) {
|
||||
public function callback(Room $room) {
|
||||
if (!$room->hasSessionsInCall()) {
|
||||
return;
|
||||
}
|
||||
|
@ -67,9 +66,12 @@ class ResetInCallFlags extends TimedJob {
|
|||
continue;
|
||||
}
|
||||
|
||||
if ($participant->isInCall() && $participant->getLastPing() < $this->timeout) {
|
||||
if ($participant->getLastPing() < $this->timeout) {
|
||||
// TODO reset session too
|
||||
if ($participant->isInCall()) {
|
||||
$room->changeInCall($session, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче