Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (27 sloc) 713 Bytes
export const SEND_MESSAGE_RESPONSE = 'SEND_MESSAGE_RESPONSE';
export const MESSAGE_SENT = 'MESSAGE_SENT';
export const SEND_MESSAGE_REQUEST = 'SEND_MESSAGE_REQUEST';
export const USER_CHANGED = 'USER_CHANGED';
export const messageReceived = (message: { from: string, content: string, time: string }) => {
return {
type: SEND_MESSAGE_RESPONSE,
message
};
};
export const sendMessage = (message: { from: string, content: string, time: string }) => {
return {
type: SEND_MESSAGE_REQUEST,
message
};
};
export const messageSent = () => {
return {
type: MESSAGE_SENT
};
};
export const changeUsername = (username: string) => {
return {
type: USER_CHANGED,
username
};
};
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.