ChatActions.js 524 B

1234567891011121314151617181920
  1. const ChatConstants = require('../constants/ChatConstants');
  2. const AppDispatcher = require('../dispatcher/AppDispatcher');
  3. const ChatActions = {
  4. toggleVisibility() {
  5. AppDispatcher.handleViewAction({
  6. actionType: ChatConstants.TOGGLE_VISIBILITY
  7. });
  8. },
  9. submitMessage(message, className, received) {
  10. AppDispatcher.handleViewAction({
  11. actionType: ChatConstants.SUBMIT_MESSAGE,
  12. message: message,
  13. className: className,
  14. received: received
  15. });
  16. }
  17. };
  18. module.exports = ChatActions;