浏览代码

update chat after sending msg

sheva77 3 年之前
父节点
当前提交
830e74e1e7
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      chat_final_bootstrap/src/Actions/ActionsGqlUpsert.js

+ 2 - 1
chat_final_bootstrap/src/Actions/ActionsGqlUpsert.js

@@ -2,7 +2,7 @@
 //
 import { urlUploadConst } from "../const";
 import { actionPromise } from "../Reducers";
-import { gql } from "../Actions";
+import { gql, actionSearchMessagesByChatId } from "../Actions";
 
 export const actionMessageUpsert = ({ text, chatId }) => async (dispatch) => {
     console.log("actionMessageUpsert --- ", text, chatId);
@@ -25,6 +25,7 @@ export const actionMessageUpsert = ({ text, chatId }) => async (dispatch) => {
 
     if (msgData && msgData.data && msgData.data.MessageUpsert && msgData.data.MessageUpsert._id) {
         console.log("MessageUpsert - ", msgData);
+        dispatch(actionSearchMessagesByChatId(chatId));
     }
 };