Styling changes for messaging.

This commit is contained in:
Patrick Fic
2020-05-04 12:14:32 -07:00
parent f55f4775d4
commit 782b7fe7f3
14 changed files with 83 additions and 54 deletions

View File

@@ -23,3 +23,8 @@ export const setSelectedConversation = (conversationId) => ({
type: MessagingActionTypes.SET_SELECTED_CONVERSATION,
payload: conversationId,
});
export const openChatByPhone = (phoneNumber) => ({
type: MessagingActionTypes.OPEN_CHAT_BY_PHONE,
payload: phoneNumber,
});

View File

@@ -3,7 +3,14 @@ import { sendMessageFailure, sendMessageSuccess } from "./messaging.actions";
import MessagingActionTypes from "./messaging.types";
import axios from "axios";
import { sendEmailFailure } from "../email/email.actions";
import { withApollo } from "react-apollo";
export function* onOpenChatByPhone() {
yield takeLatest(MessagingActionTypes.OPEN_CHAT_BY_PHONE, openChatByPhone);
}
export function* openChatByPhone({ payload: phone, client }) {
console.log("Payload: Phone, Client", phone, client);
}
export function* onSendMessage() {
yield takeLatest(MessagingActionTypes.SEND_MESSAGE, sendMessage);
}
@@ -22,5 +29,5 @@ export function* sendMessage({ payload }) {
}
export function* messagingSagas() {
yield all([call(onSendMessage)]);
yield all([call(onSendMessage), call(onOpenChatByPhone)]);
}

View File

@@ -3,6 +3,7 @@ const MessagingActionTypes = {
SEND_MESSAGE: "SEND_MESSAGE",
SEND_MESSAGE_SUCCESS: "SEND_MESSAGE_SUCCESS",
SEND_MESSAGE_FAILURE: "SEND_MESSAGE_FAILURE",
SET_SELECTED_CONVERSATION: 'SET_SELECTED_CONVERSATION'
SET_SELECTED_CONVERSATION: "SET_SELECTED_CONVERSATION",
OPEN_CHAT_BY_PHONE: "OPEN_CHAT_BY_PHONE",
};
export default MessagingActionTypes;