From b4337227645a781b8b868f3a37e0af36ee9f00c0 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Sun, 22 Aug 2021 00:32:09 +0800 Subject: [PATCH] Change mqtt channel for rider app #617 --- src/Service/MQTTClient.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Service/MQTTClient.php b/src/Service/MQTTClient.php index c9c7a4f2..13c884a0 100644 --- a/src/Service/MQTTClient.php +++ b/src/Service/MQTTClient.php @@ -72,6 +72,8 @@ class MQTTClient if ($rider == null) return; + /* + // NOTE: this is for the old rider app // check if rider has sessions $sessions = $rider->getSessions(); if (count($sessions) == 0) @@ -84,5 +86,9 @@ class MQTTClient $channel = self::RIDER_PREFIX . $sess_id; $this->publish($channel, json_encode($payload)); } + */ + + // NOTE: this is for the new rider app + $this->publish('rider/' . $rider->getID(), json_encode($payload)); } }