Handling new api structure with client-triggered broadcasts
This commit is contained in:
@ -60,10 +60,13 @@ export function getVersion(){
|
||||
}
|
||||
}
|
||||
|
||||
export function deliverBroadcast(data = null){
|
||||
export function deliverBroadcast(method, params){
|
||||
return {
|
||||
type: 'PUSHER_DELIVER_BROADCAST',
|
||||
data: data
|
||||
data: {
|
||||
method: method,
|
||||
params: params
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -136,7 +136,10 @@ const PusherMiddleware = (function(){
|
||||
|
||||
socket.onopen = () => {
|
||||
store.dispatch({
|
||||
type: 'PUSHER_CONNECTED'
|
||||
type: 'PUSHER_CONNECTED',
|
||||
connection_id: connection.connection_id,
|
||||
client_id: connection.client_id,
|
||||
username: connection.username
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user