From ecc6fdf29162fbdc09cc38ce2927718409d5ec8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Sun, 3 Jan 2021 17:47:51 +0100 Subject: [PATCH] Counting bugfix --- .gitlab-ci.yml | 2 +- lib/CF/Controller/Websockets.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f466356..22556c0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ image: docker:19.03.1 variables: DOCKER_TLS_CERTDIR: "/certs" IMAGE_TAG: $CI_REGISTRY_IMAGE - IMAGE_VER: 1.6.0 + IMAGE_VER: 1.6.1 services: - docker:19.03.1-dind diff --git a/lib/CF/Controller/Websockets.pm b/lib/CF/Controller/Websockets.pm index cd22a91..9600e85 100644 --- a/lib/CF/Controller/Websockets.pm +++ b/lib/CF/Controller/Websockets.pm @@ -55,8 +55,8 @@ sub main { my $tx = $c->pg->db->begin; $c->pg->db->delete('sockets', [ - {id => $key}, - {user_id => $message->{payload} || undef }, + {id => $key}, + $user ? {user_id => $user->{id}}:{} ]); $c->pg->db->insert('sockets', { -- GitLab