From 4b4dce80cfb5328da732237333b37a9e52f9294c Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 3 Nov 2021 21:16:46 +0800 Subject: [PATCH] push modify --- src/push/logic/push_to_client.go | 34 +++++++++++++++----------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/push/logic/push_to_client.go b/src/push/logic/push_to_client.go index b535dd11a..b424d6acb 100644 --- a/src/push/logic/push_to_client.go +++ b/src/push/logic/push_to_client.go @@ -14,11 +14,9 @@ import ( pbChat "Open_IM/src/proto/chat" pbGroup "Open_IM/src/proto/group" pbRelay "Open_IM/src/proto/relay" - push "Open_IM/src/push/jpush" rpcChat "Open_IM/src/rpc/chat/chat" "Open_IM/src/utils" "context" - "encoding/json" "strings" ) @@ -58,22 +56,22 @@ func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo, Options string) { for _, t := range pushTerminal { if v.RecvPlatFormID == t { //Use offline push messaging - var UIDList []string - UIDList = append(UIDList, sendPbData.RecvID) - customContent := EChatContent{ - SessionType: int(sendPbData.SessionType), - From: sendPbData.SendID, - To: sendPbData.RecvID, - Seq: sendPbData.RecvSeq, - } - bCustomContent, _ := json.Marshal(customContent) - jsonCustomContent := string(bCustomContent) - pushResult, err := push.JGAccountListPush(UIDList, jsonCustomContent, utils.PlatformIDToName(t)) - if err != nil { - log.NewError(sendPbData.OperationID, "offline push error", sendPbData.String(), err.Error(), t) - } else { - log.NewDebug(sendPbData.OperationID, "offline push return result is ", string(pushResult), sendPbData, t) - } + //var UIDList []string + //UIDList = append(UIDList, sendPbData.RecvID) + //customContent := EChatContent{ + // SessionType: int(sendPbData.SessionType), + // From: sendPbData.SendID, + // To: sendPbData.RecvID, + // Seq: sendPbData.RecvSeq, + //} + //bCustomContent, _ := json.Marshal(customContent) + //jsonCustomContent := string(bCustomContent) + //pushResult, err := push.JGAccountListPush(UIDList, jsonCustomContent, utils.PlatformIDToName(t)) + //if err != nil { + // log.NewError(sendPbData.OperationID, "offline push error", sendPbData.String(), err.Error(), t) + //} else { + // log.NewDebug(sendPbData.OperationID, "offline push return result is ", string(pushResult), sendPbData, t) + //} } }