diff --git a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php index 72bc1c78..11beab1d 100644 --- a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php +++ b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php @@ -976,7 +976,8 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface $jo->requeue(); - // TODO: do we leave JO as assigned to rider? + // set rider to null + $jo->clearRider(); // add event log $rider = $this->session->getRider(); @@ -997,6 +998,12 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface ]; $this->mclient->sendEvent($jo, $payload); + // send available event to change rider icon status + $channel = 'rider/' . $rider->getID() . '/status'; + $rider_status = 'available'; + + $this->mclient->publish($channel, $rider_status); + return $data; }