2017-06-06 23:03:35 +00:00
|
|
|
export const APP_SET = 'APP_SET';
|
|
|
|
|
2015-12-28 23:34:32 +00:00
|
|
|
export const INVITE = 'INVITE';
|
|
|
|
export const JOIN = 'JOIN';
|
|
|
|
export const KICK = 'KICK';
|
|
|
|
export const PART = 'PART';
|
2017-05-28 05:20:43 +00:00
|
|
|
export const SET_TOPIC = 'SET_TOPIC';
|
2017-05-26 06:20:00 +00:00
|
|
|
|
|
|
|
export const INPUT_HISTORY_ADD = 'INPUT_HISTORY_ADD';
|
|
|
|
export const INPUT_HISTORY_DECREMENT = 'INPUT_HISTORY_DECREMENT';
|
|
|
|
export const INPUT_HISTORY_INCREMENT = 'INPUT_HISTORY_INCREMENT';
|
|
|
|
export const INPUT_HISTORY_RESET = 'INPUT_HISTORY_RESET';
|
|
|
|
|
2017-06-06 22:04:37 +00:00
|
|
|
export const ADD_FETCHED_MESSAGES = 'ADD_FETCHED_MESSAGES';
|
2017-05-26 06:20:00 +00:00
|
|
|
export const ADD_MESSAGE = 'ADD_MESSAGE';
|
|
|
|
export const ADD_MESSAGES = 'ADD_MESSAGES';
|
|
|
|
export const COMMAND = 'COMMAND';
|
|
|
|
export const FETCH_MESSAGES = 'FETCH_MESSAGES';
|
2016-01-27 19:48:47 +00:00
|
|
|
export const RAW = 'RAW';
|
2017-05-26 06:20:00 +00:00
|
|
|
export const UPDATE_MESSAGE_HEIGHT = 'UPDATE_MESSAGE_HEIGHT';
|
|
|
|
|
|
|
|
export const CLOSE_PRIVATE_CHAT = 'CLOSE_PRIVATE_CHAT';
|
|
|
|
export const OPEN_PRIVATE_CHAT = 'OPEN_PRIVATE_CHAT';
|
|
|
|
|
2015-12-28 23:34:32 +00:00
|
|
|
export const SEARCH_MESSAGES = 'SEARCH_MESSAGES';
|
2017-05-26 06:20:00 +00:00
|
|
|
export const TOGGLE_SEARCH = 'TOGGLE_SEARCH';
|
|
|
|
|
|
|
|
export const AWAY = 'AWAY';
|
|
|
|
export const CONNECT = 'CONNECT';
|
|
|
|
export const DISCONNECT = 'DISCONNECT';
|
2017-07-04 09:28:56 +00:00
|
|
|
export const RECONNECT = 'RECONNECT';
|
2017-05-26 06:20:00 +00:00
|
|
|
export const SET_NICK = 'SET_NICK';
|
2017-06-12 04:18:32 +00:00
|
|
|
export const SET_SERVER_NAME = 'SET_SERVER_NAME';
|
2017-05-26 06:20:00 +00:00
|
|
|
export const WHOIS = 'WHOIS';
|
|
|
|
|
2016-01-11 20:04:57 +00:00
|
|
|
export const SET_CERT = 'SET_CERT';
|
|
|
|
export const SET_CERT_ERROR = 'SET_CERT_ERROR';
|
|
|
|
export const SET_KEY = 'SET_KEY';
|
2017-05-26 06:20:00 +00:00
|
|
|
export const UPLOAD_CERT = 'UPLOAD_CERT';
|
2018-10-15 06:56:17 +00:00
|
|
|
export const SETTINGS_SET = 'SETTINGS_SET';
|
2017-05-26 06:20:00 +00:00
|
|
|
|
|
|
|
export const SELECT_TAB = 'SELECT_TAB';
|
|
|
|
|
|
|
|
export const HIDE_MENU = 'HIDE_MENU';
|
2015-12-28 23:34:32 +00:00
|
|
|
export const TOGGLE_MENU = 'TOGGLE_MENU';
|
2016-01-11 22:31:06 +00:00
|
|
|
export const TOGGLE_USERLIST = 'TOGGLE_USERLIST';
|
2017-05-26 06:20:00 +00:00
|
|
|
|
|
|
|
export function socketAction(type) {
|
|
|
|
return `SOCKET_${type.toUpperCase()}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
function createSocketActions(types) {
|
|
|
|
const actions = {};
|
|
|
|
types.forEach(type => {
|
|
|
|
actions[type.toUpperCase()] = socketAction(type);
|
|
|
|
});
|
|
|
|
return actions;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const socket = createSocketActions([
|
|
|
|
'cert_fail',
|
|
|
|
'cert_success',
|
|
|
|
'channels',
|
|
|
|
'connection_update',
|
|
|
|
'join',
|
|
|
|
'message',
|
|
|
|
'mode',
|
2017-06-21 05:23:07 +00:00
|
|
|
'nick_fail',
|
2017-05-26 06:20:00 +00:00
|
|
|
'nick',
|
|
|
|
'part',
|
|
|
|
'pm',
|
|
|
|
'quit',
|
|
|
|
'search',
|
|
|
|
'servers',
|
|
|
|
'topic',
|
|
|
|
'users'
|
|
|
|
]);
|