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

23 lines
388 B
JavaScript
Raw Normal View History

2015-01-17 01:37:21 +00:00
var Reflux = require('reflux');
var _ = require('lodash');
2015-01-17 01:37:21 +00:00
var socket = require('../socket');
2015-01-17 01:37:21 +00:00
var messageActions = Reflux.createActions([
'send',
'add',
'broadcast',
'inform',
'command',
'setWrapWidth'
2015-01-17 01:37:21 +00:00
]);
messageActions.send.preEmit = function(message, to, server) {
2015-01-21 23:14:28 +00:00
socket.send('chat', {
server: server,
to: to,
message: message
});
2015-01-17 01:37:21 +00:00
};
module.exports = messageActions;