Change mqtt channel for rider app #617
This commit is contained in:
parent
cf12d09ee5
commit
b433722764
1 changed files with 6 additions and 0 deletions
|
|
@ -72,6 +72,8 @@ class MQTTClient
|
||||||
if ($rider == null)
|
if ($rider == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
|
// NOTE: this is for the old rider app
|
||||||
// check if rider has sessions
|
// check if rider has sessions
|
||||||
$sessions = $rider->getSessions();
|
$sessions = $rider->getSessions();
|
||||||
if (count($sessions) == 0)
|
if (count($sessions) == 0)
|
||||||
|
|
@ -84,5 +86,9 @@ class MQTTClient
|
||||||
$channel = self::RIDER_PREFIX . $sess_id;
|
$channel = self::RIDER_PREFIX . $sess_id;
|
||||||
$this->publish($channel, json_encode($payload));
|
$this->publish($channel, json_encode($payload));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// NOTE: this is for the new rider app
|
||||||
|
$this->publish('rider/' . $rider->getID(), json_encode($payload));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue