fix bug :pushMsg.MsgData.OfflinePushInfo==nil

This commit is contained in:
skiffer-git
2022-09-01 21:58:22 +08:00
parent ac2cc154b4
commit e990118475
3 changed files with 20 additions and 2 deletions
+5 -2
View File
@@ -297,8 +297,11 @@ func GetOfflinePushOpts(pushMsg *pbPush.PushMsgReq) (opts push.PushOpts, err err
log.NewDebug(pushMsg.OperationID, opts)
}
}
opts.IOSBadgeCount = pushMsg.MsgData.OfflinePushInfo.IOSBadgeCount
opts.IOSPushSound = pushMsg.MsgData.OfflinePushInfo.IOSPushSound
if pushMsg.MsgData.OfflinePushInfo != nil {
opts.IOSBadgeCount = pushMsg.MsgData.OfflinePushInfo.IOSBadgeCount
opts.IOSPushSound = pushMsg.MsgData.OfflinePushInfo.IOSPushSound
}
return opts, nil
}
+1
View File
@@ -142,6 +142,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, http.WrapError(constant.ErrDB)
}
}
if req.GroupInfo.GroupType != constant.SuperGroup {
//to group member
for _, user := range req.InitMemberList {