Skip to content

Commit

Permalink
add field 'date' on firebase message
Browse files Browse the repository at this point in the history
  • Loading branch information
LaercioSantana committed Oct 11, 2016
1 parent 9ef885b commit aaa965b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions application/controllers/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ function addMessage($idRoute, $idBus){
if(empty($idBus))
unset($notification->id_bus);

//put date on the firebase message
$notification->date = date('Y-m-d H:i:s');

$this->notify($this->messages_model->getNotificationRegistration($idRoute), $notification);

return $this->makeJsonRespose($notification, 201);
Expand Down

0 comments on commit aaa965b

Please sign in to comment.