2016-10-27 16:58:11 +13:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Actions and Action Creators
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
|
|
export function setConfig( config ){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_SET_CONFIG',
|
|
|
|
|
config: config
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-28 15:58:07 +13:00
|
|
|
export function changeUsername( username ){
|
2016-10-28 09:14:29 +13:00
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_INSTRUCT',
|
2016-10-28 15:58:07 +13:00
|
|
|
action: 'change_username',
|
|
|
|
|
data: username
|
2016-10-28 09:14:29 +13:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-27 16:58:11 +13:00
|
|
|
export function connect(){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_CONNECT'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function disconnect(){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_DISCONNECT'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-29 22:40:02 +13:00
|
|
|
export function performUpgrade(){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_UPGRADING'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-28 09:14:29 +13:00
|
|
|
export function getConnectionList(){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_INSTRUCT',
|
|
|
|
|
action: 'get_connections'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function instruct( action, data = null ){
|
2016-10-27 16:58:11 +13:00
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_INSTRUCT',
|
2016-10-28 09:14:29 +13:00
|
|
|
action: action,
|
|
|
|
|
data: data
|
2016-10-27 16:58:11 +13:00
|
|
|
}
|
|
|
|
|
}
|