18 lines
328 B
JavaScript
18 lines
328 B
JavaScript
var Reflux = require('reflux');
|
|
|
|
var socket = require('../socket');
|
|
|
|
var messageActions = Reflux.createActions([
|
|
'send',
|
|
'add',
|
|
'broadcast',
|
|
'inform',
|
|
'command',
|
|
'setWrapWidth'
|
|
]);
|
|
|
|
messageActions.send.preEmit = (message, to, server) => {
|
|
socket.send('chat', { server, to, message });
|
|
};
|
|
|
|
module.exports = messageActions; |