diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php index ed03fea0d19..6fc2ba16d2d 100644 --- a/lib/Service/RoomService.php +++ b/lib/Service/RoomService.php @@ -1074,17 +1074,13 @@ public function syncPropertiesFromHostRoom(Room $local, array $host): void { $this->setLastActivity($local, $lastActivity); $changed[] = ARoomSyncedEvent::PROPERTY_LAST_ACTIVITY; } - if (isset($host['lobbyState'], $host['lobbyTimer']) && $host['lobbyState'] !== $local->getLobbyState(false)) { + if (isset($host['lobbyState'], $host['lobbyTimer']) && ($host['lobbyState'] !== $local->getLobbyState(false) || $host['lobbyTimer'] !== ((int) $local->getLobbyTimer(false)?->getTimestamp()))) { $hostTimer = $host['lobbyTimer'] === 0 ? null : $this->timeFactory->getDateTime('@' . $host['lobbyTimer']); - $localTimer = $local->getLobbyTimer(false); - if ($host['lobbyState'] !== $local->getLobbyState(false) - || $hostTimer?->getTimestamp() !== $localTimer?->getTimestamp()) { - $success = $this->setLobby($local, $host['lobbyState'], $hostTimer); - if (!$success) { - $this->logger->error('An error occurred while trying to sync lobby of ' . $local->getId() . ' to ' . $host['lobbyState'] . ' with timer to ' . $host['lobbyTimer']); - } else { - $changed[] = ARoomModifiedEvent::PROPERTY_LOBBY; - } + $success = $this->setLobby($local, $host['lobbyState'], $hostTimer); + if (!$success) { + $this->logger->error('An error occurred while trying to sync lobby of ' . $local->getId() . ' to ' . $host['lobbyState'] . ' with timer to ' . $host['lobbyTimer']); + } else { + $changed[] = ARoomModifiedEvent::PROPERTY_LOBBY; } } if (isset($host['callStartTime'], $host['callFlag'])) {