dispatch/client/src/js/actions/message.js

19 lines
339 B
JavaScript
Raw Normal View History

2015-01-17 01:37:21 +00:00
var Reflux = require('reflux');
var socket = require('../socket');
2015-01-17 01:37:21 +00:00
var messageActions = Reflux.createActions([
'send',
'add',
2015-06-09 22:45:28 +00:00
'addAll',
'broadcast',
'inform',
'command',
'setWrapWidth'
2015-01-17 01:37:21 +00:00
]);
messageActions.send.preEmit = (message, to, server) => {
socket.send('chat', { server, to, message });
2015-01-17 01:37:21 +00:00
};
module.exports = messageActions;