mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 12:36:00 +08:00
callback add offline info
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
http2 "net/http"
|
||||
)
|
||||
|
||||
func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.MsgData, offlinePushUserIDList *[]string) cbApi.CommonCallbackResp {
|
||||
func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.MsgData, offlinePushUserIDList *[]string, offlineInfo *commonPb.OfflinePushInfo) cbApi.CommonCallbackResp {
|
||||
callbackResp := cbApi.CommonCallbackResp{OperationID: operationID}
|
||||
if !config.Config.Callback.CallbackOfflinePush.Enable {
|
||||
return callbackResp
|
||||
@@ -47,8 +47,13 @@ func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.
|
||||
return callbackResp
|
||||
}
|
||||
}
|
||||
if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow && len(resp.UserIDList) != 0 {
|
||||
*offlinePushUserIDList = resp.UserIDList
|
||||
if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow {
|
||||
if len(resp.UserIDList) != 0 {
|
||||
*offlinePushUserIDList = resp.UserIDList
|
||||
}
|
||||
if resp.OfflinePushInfo != nil {
|
||||
*offlineInfo = *resp.OfflinePushInfo
|
||||
}
|
||||
}
|
||||
log.NewDebug(operationID, utils.GetSelfFuncName(), offlinePushUserIDList, resp.UserIDList)
|
||||
return callbackResp
|
||||
|
||||
Reference in New Issue
Block a user