21 lines
654 B
JavaScript
21 lines
654 B
JavaScript
export const SEND_MESSAGE = 'SEND_MESSAGE'
|
|
export const SEND_MESSAGE_SUCCESS = 'SEND_MESSAGE_SUCCESS';
|
|
export const SEND_MESSAGE_FAILURE = 'SEND_MESSAGE_FAILURE';
|
|
|
|
export function sendMessage (channel, text) {
|
|
return { type: SEND_MESSAGE, channel, text }
|
|
}
|
|
|
|
export const FETCH_MESSAGES = 'FETCH_MESSAGES'
|
|
export const FETCH_MESSAGES_SUCCESS = 'FETCH_MESSAGES_SUCCESS';
|
|
export const FETCH_MESSAGES_FAILURE = 'FETCH_MESSAGES_FAILURE';
|
|
|
|
export function fetchMessages (channel) {
|
|
return { type: FETCH_MESSAGES, channel }
|
|
}
|
|
|
|
export const STREAM_EVENTS = 'STREAM_EVENTS'
|
|
export function streamEvents (channel) {
|
|
return { type: STREAM_EVENTS, channel }
|
|
}
|