From 0ed9aa5372c32175b75e89e0abb88db3c2539e1c Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 10 Dec 2021 17:00:24 +0800 Subject: [PATCH] sender message sync --- internal/msg_gateway/gate/rpc_server.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/msg_gateway/gate/rpc_server.go b/internal/msg_gateway/gate/rpc_server.go index 7a0632fad..972cf30f4 100644 --- a/internal/msg_gateway/gate/rpc_server.go +++ b/internal/msg_gateway/gate/rpc_server.go @@ -115,6 +115,16 @@ func (r *RPCServer) MsgToUser(_ context.Context, in *pbRelay.MsgToUserReq) (*pbR resp = append(resp, temp) } } + //Single chat sender synchronization message + if in.GetSessionType() == constant.SingleChatType { + userIDList = genUidPlatformArray(in.SendID) + for _, v := range userIDList { + UIDAndPID = strings.Split(v, " ") + if conn := ws.getUserConn(v); conn != nil { + _ = sendMsgToUser(conn, replyBytes.Bytes(), in, UIDAndPID[1], UIDAndPID[0]) + } + } + } if !tag { log.NewError(in.OperationID, "push err ,no matched ws conn not in map", in.String()) }