diff --git a/lib/CF/Controller/Websockets.pm b/lib/CF/Controller/Websockets.pm index bb8afc10d09bbe1cc57545566105458b5094fe1a..3ae28fc224dc23d0263a48a99ccbe57b55f10cc8 100644 --- a/lib/CF/Controller/Websockets.pm +++ b/lib/CF/Controller/Websockets.pm @@ -22,23 +22,25 @@ sub main { my $event_id = 0; #TODO - parametr! my $listener = $pubsub->listen( - "notify:$event_id" => sub($pubsub, $payload) { + "notify:$event_id" => sub($pubsub, $payload, $channel) { + $c->trace("$pubsub, $payload, $channel"); $c->send(decode("UTF-8", $payload)); } ); my $listener_online = $pubsub->listen( - "online:$event_id" => sub($pubsub, $payload) { - my @counts = split ' ', $payload; - $c->send({json => { - event => 'online_users_updated', - payload => { - all => $counts[0]+0, - members => $counts[1]+0, - group_size_full => $counts[2]+0, - group_size_half => $counts[3]+0, - } - }}); + "online:$event_id" => sub($pubsub, $payload, $channel) { + $c->trace("$pubsub, $payload, $channel"); +# my @counts = split ' ', $payload; +# $c->send({json => { +# event => 'online_users_updated', +# payload => { +# all => $counts[0]+0, +# members => $counts[1]+0, +# group_size_full => $counts[2]+0, +# group_size_half => $counts[3]+0, +# } +# }}); } ); diff --git a/openapi.yaml b/openapi.yaml index 144c35454a99b92bb176203faf9e4cce8193073b..ad87abe293d33d14d81c1f0aae885b12e754740d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: - version: "3.2.3" + version: "3.2.4" title: CF Online description: CF Online license: