Я работаю над уведомлениями в Symfony. Я создал учетную запись в pusher, но когда я тестирую свой brodcast, он возвращает статус 200, но мой клиент не получает данные, спасибо за помощь
Сообщение из строки консоли
Pusher : State changed : connecting -> connected with new socket ID
126177.5282876
pusher.min.js:8 Pusher : Event sent :
{"event":"pusher:ping","data":{}}
pusher.min.js:8 Pusher : Event recd :
{"event":"pusher:pong","data":{}}
Сообщение командной строки
Pushing message ...
string(270) "Pusher: INFO: create_curl( http://api-
eu.pusher.com:80/apps/173/events?
auth_key=a3ab9880a251ef5134bed9 )"
string(115) "Pusher: INFO: trigger POST: {"name":"my-
event","data":"{\"test-message\":\"Your message\"}","channels":
["channel"]}"
string(40) "Pusher: INFO: exec_curl 200 response: {}"
string(81) "Pusher: INFO: exec_curl response: Array
(
[body] => {}
[status] => 200
)
"
Я делаю тест с этим кодом:
{# Call NotificationsBundles's assets #}
{{ notifications_assets() }}
<script>
/**
* After calling notifications_assets() "pusher" is now available
* and you can use it this way
*/
// select the channel you want to listen to
var channel = pusher.subscribe("notifications");// notifications
channel
channel.bind("my-event", function(data) {
console.log('from notifications channel', data);
});
var channel = pusher.subscribe("messages");// messages channel
channel.bind("my-event", function(data) {
console.log('from messages channel', data);
});