sessions: ignore self-emitted update events

Signed-off-by: chandi Langecker <git@chandi.it>
This commit is contained in:
chandi Langecker
2022-11-21 20:01:53 +01:00
parent 6d86ec70ef
commit 541ee13780
4 changed files with 74 additions and 30 deletions

View File

@@ -56,7 +56,7 @@ class SessionMapper extends QBMapper {
public function findAllActive($boardId) {
$qb = $this->db->getQueryBuilder();
$qb->select('id', 'board_id', 'last_contact', 'user_id')
$qb->select('id', 'board_id', 'last_contact', 'user_id', 'token')
->from($this->getTableName())
->where($qb->expr()->eq('board_id', $qb->createNamedParameter($boardId)))
->andWhere($qb->expr()->gt('last_contact', $qb->createNamedParameter(time() - SessionService::SESSION_VALID_TIME)))