Browse Source
Make the methods public so the callables work
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/698/head
Joas Schilling
8 years ago
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
2 changed files with
7 additions and
5 deletions
-
lib/BackgroundJob/RemoveEmptyRooms.php
-
lib/BackgroundJob/ResetInCallFlags.php
|
|
|
@ -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,8 +66,11 @@ class ResetInCallFlags extends TimedJob { |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
if ($participant->isInCall() && $participant->getLastPing() < $this->timeout) { |
|
|
|
$room->changeInCall($session, false); |
|
|
|
if ($participant->getLastPing() < $this->timeout) { |
|
|
|
// TODO reset session too
|
|
|
|
if ($participant->isInCall()) { |
|
|
|
$room->changeInCall($session, false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|