ソースを参照

update

master
DengBiao 1年前
コミット
e0cada2232
1個のファイルの変更11行の追加1行の削除
  1. +11
    -1
      internal/logic/domain/message/service/message_service.go

+ 11
- 1
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)


読み込み中…
キャンセル
保存