ChatActions.js 484 B

123456789101112131415161718192021
  1. import ChatConstants from '../constants/ChatConstants';
  2. import AppDispatcher from '../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,
  13. className,
  14. received
  15. });
  16. }
  17. };
  18. export default ChatActions;