From e0cada223283811f4aeb255f2f321058e29109cb Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Tue, 28 Feb 2023 20:34:13 +0800 Subject: [PATCH] update --- .../logic/domain/message/service/message_service.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/logic/domain/message/service/message_service.go b/internal/logic/domain/message/service/message_service.go index 903383b..63ea96a 100644 --- a/internal/logic/domain/message/service/message_service.go +++ b/internal/logic/domain/message/service/message_service.go @@ -4,6 +4,7 @@ import ( "context" "gim/internal/business/comm/db" svc "gim/internal/business/comm/service" + "gim/internal/business/comm/utils" repo2 "gim/internal/business/domain/user/repo" "gim/internal/logic/domain/message/md" "gim/internal/logic/domain/message/model" @@ -158,8 +159,17 @@ func (*messageService) SendToUser(ctx context.Context, sender *pb.Sender, toUser return 0, err } + isOpenAppPush := svc.SysCfgGet(masterId, "is_open_app_push") + utils.FilePutContents("SendToUser", utils.SerializeStr(map[string]interface{}{ + "devices_len": len(devices), + "sender": sender, + "toUserId": toUserId, + "isOpenAppPush": isOpenAppPush, + "req": req, + })) + if len(devices) <= 0 { - isOpenAppPush := svc.SysCfgGet(masterId, "is_open_app_push") + //isOpenAppPush := svc.SysCfgGet(masterId, "is_open_app_push") if sender.SenderType == pb.SenderType_ST_USER && req.ReceiverType == pb.ReceiverType_RT_USER && isOpenAppPush == "1" && req.ReceiverId != toUserId { uid := strconv.FormatInt(req.ReceiverId, 10) alia := db.DbUserPushForJg.UserPushForJgGetWithDb(masterId, uid)