Skip to content

Commit

Permalink
modify send notification, and chmod file
Browse files Browse the repository at this point in the history
  • Loading branch information
Stroia Laurentiu committed May 5, 2016
1 parent 54d66f2 commit 2a9200d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Command/ServerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$port = $this->getContainer()->getParameter('gfs_notifications.config')['port'];
file_put_contents(NotificationBundle::getGfsNotificationToken(),md5(uniqid(rand(),true)));
chmod(NotificationBundle::getGfsNotificationToken(),0777);
$notification = $this->getContainer()->getParameter('gfs_notifications.config')['notification'];
$server = IoServer::factory(
new HttpServer(
Expand Down
2 changes: 1 addition & 1 deletion Notification/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function onMessage(ConnectionInterface $from, $msg)
if(!empty($this->users[$notification['userId']])){
foreach ($this->users[$notification['userId']] as $client) {
// The sender is not the receiver, send to each client connected
$client->send($msg);
$client->send(json_encode($notification));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gfs/notifications",
"version": "v1.0.1",
"version": "v1.0.2",
"description": "Symfony GFSNotificationsBundle",
"keywords": ["User notifications"],
"license": "MIT",
Expand Down

0 comments on commit 2a9200d

Please sign in to comment.