|
|
@@ -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) |
|
|
|