Skip to content
Snippets Groups Projects
Verified Commit c6bf1bc0 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Podpora kompresse, bugfix pocitani anonimous

parent 30b64306
No related branches found
No related tags found
No related merge requests found
Pipeline #1986 passed
......@@ -3,7 +3,7 @@ image: docker:19.03.1
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_TAG: $CI_REGISTRY_IMAGE
IMAGE_VER: 1.4.0
IMAGE_VER: 1.5.0
services:
- docker:19.03.1-dind
......
......@@ -17,6 +17,10 @@ sub main {
$c->inactivity_timeout(SOCKET_INACTIVITY_TIMEOUT);
if ($c->req->headers->header('Sec-WebSocket-Key') =~ /deflate/) {
$c->tx->compressed(1);
}
my $pubsub = Mojo::Pg::PubSub->new(pg => $c->pg);
$pubsub->listen(notify => sub($pubsub, $payload) {
......@@ -51,7 +55,7 @@ sub main {
$c->pg->db->delete('sockets', [
{id => $key},
{user_id => $message->{payload}},
{user_id => $message->{payload} || undef },
]);
$c->pg->db->insert('sockets', {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment