Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-03-12 13:44:24 +0300
committerJoas Schilling <coding@schilljs.com>2018-03-12 14:22:56 +0300
commiteab0a9059df1eb1972a980b7d757e4bc42ec1184 (patch)
tree700e7ce037b8aec4eb8d81848173a1d6ed747cc9 /lib/BackgroundJob
parentb88394f26580bab982d9e0407d59c2526dd6b7ab (diff)
Make the methods public so the callables work
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/BackgroundJob')
-rw-r--r--lib/BackgroundJob/RemoveEmptyRooms.php2
-rw-r--r--lib/BackgroundJob/ResetInCallFlags.php10
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/BackgroundJob/RemoveEmptyRooms.php b/lib/BackgroundJob/RemoveEmptyRooms.php
index 246762b39..203697488 100644
--- a/lib/BackgroundJob/RemoveEmptyRooms.php
+++ b/lib/BackgroundJob/RemoveEmptyRooms.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++;
diff --git a/lib/BackgroundJob/ResetInCallFlags.php b/lib/BackgroundJob/ResetInCallFlags.php
index dbff79a3a..29006981d 100644
--- a/lib/BackgroundJob/ResetInCallFlags.php
+++ b/lib/BackgroundJob/ResetInCallFlags.php
@@ -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);
+ }
}
}
}