From 9b67d1072d7764c163a4c8512f576eeb47964d5d Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 13 Aug 2017 12:36:32 +0200 Subject: fix stats_update notification --- worker.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'worker.js') diff --git a/worker.js b/worker.js index f5531d8..281ca1b 100644 --- a/worker.js +++ b/worker.js @@ -262,11 +262,9 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { // notify web await Promise.map(msgs, async (m) => { if (m.properties.headers.notify == undefined) return; - let notif = ""; switch (m.properties.type) { // new match case "match": - notif = "matches_update"; // notify player.name.api_id about match_update await Promise.map(match_objects, async (mat) => await ch.publish("amq.topic", @@ -278,7 +276,8 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { break; case "player": // player obj updated - notif = "stats_update"; + await ch.publish("amq.topic", m.properties.headers.notify, + new Buffer("stats_update")); break; } }); -- cgit v1.3.1