Styling changes for messaging.
This commit is contained in:
@@ -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,
|
||||
});
|
||||
@@ -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)]);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user