summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2024-07-17 12:15:59 +0200
committerGitHub <noreply@github.com>2024-07-17 12:15:59 +0200
commitd4065fc381c2b63742fc60f9876f4f40efea57d1 (patch)
treebf41053eedfda8064ac8bc4a678b7a034f830a73
parentae4b75c9e8f9c81c4a3b969a0a1e3468ff6bf080 (diff)
parentfdde3766832138f4290e953a7d63c018a5261c20 (diff)
Merge pull request #12741 from nextcloud/bugfix/noid/ignore-outdated-sessions
fix(federation): Ignore outdated sessions when checking for active se…
-rw-r--r--lib/Service/ParticipantService.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php
index c5b2fcba8..cda78d1d6 100644
--- a/lib/Service/ParticipantService.php
+++ b/lib/Service/ParticipantService.php
@@ -1881,7 +1881,8 @@ class ParticipantService {
$query->from('talk_attendees', 'a')
->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX(
$query->expr()->eq('a.id', 's.attendee_id'),
- $query->expr()->eq('s.state', $query->createNamedParameter(Session::STATE_ACTIVE, IQueryBuilder::PARAM_INT))
+ $query->expr()->eq('s.state', $query->createNamedParameter(Session::STATE_ACTIVE, IQueryBuilder::PARAM_INT)),
+ $query->expr()->gte('s.last_ping', $query->createNamedParameter($this->timeFactory->getTime() - Session::SESSION_TIMEOUT, IQueryBuilder::PARAM_INT)),
))
->where($query->expr()->eq('a.actor_type', $query->createNamedParameter(Attendee::ACTOR_USERS)))
->andWhere($query->expr()->eq('a.actor_id', $query->createNamedParameter($userId)))