From cad23f167220529adc041ca41091bc8bc8aae072 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 21 Sep 2022 16:09:02 +0800 Subject: [PATCH] online push info callback update --- internal/push/logic/callback.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/internal/push/logic/callback.go b/internal/push/logic/callback.go index f9722f3c2..746b9e122 100644 --- a/internal/push/logic/callback.go +++ b/internal/push/logic/callback.go @@ -96,6 +96,11 @@ func callbackOnlinePush(operationID string, userIDList []string, msg *commonPb.M return callbackResp } } + if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow { + if resp.OfflinePushInfo != nil { + msg.OfflinePushInfo = resp.OfflinePushInfo + } + } return callbackResp } @@ -133,8 +138,13 @@ func callbackBeforeSuperGroupOnlinePush(operationID string, groupID string, msg return callbackResp } } - if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow && len(resp.UserIDList) != 0 { - *pushToUserList = resp.UserIDList + if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow { + if len(resp.UserIDList) != 0 { + *pushToUserList = resp.UserIDList + } + if resp.OfflinePushInfo != nil { + msg.OfflinePushInfo = resp.OfflinePushInfo + } } log.NewDebug(operationID, utils.GetSelfFuncName(), pushToUserList, resp.UserIDList) return callbackResp