mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-13 15:25:03 +08:00
callback add seq
This commit is contained in:
parent
9394d340a2
commit
f2a35fb833
@ -75,7 +75,7 @@ func callbackOnlinePush(operationID string, userIDList []string, msg *commonPb.M
|
|||||||
},
|
},
|
||||||
UserIDList: userIDList,
|
UserIDList: userIDList,
|
||||||
},
|
},
|
||||||
OfflinePushInfo: msg.OfflinePushInfo,
|
//OfflinePushInfo: msg.OfflinePushInfo,
|
||||||
ClientMsgID: msg.ClientMsgID,
|
ClientMsgID: msg.ClientMsgID,
|
||||||
SendID: msg.SendID,
|
SendID: msg.SendID,
|
||||||
GroupID: msg.GroupID,
|
GroupID: msg.GroupID,
|
||||||
@ -97,9 +97,9 @@ func callbackOnlinePush(operationID string, userIDList []string, msg *commonPb.M
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow {
|
if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow {
|
||||||
if resp.OfflinePushInfo != nil {
|
//if resp.OfflinePushInfo != nil {
|
||||||
msg.OfflinePushInfo = resp.OfflinePushInfo
|
// msg.OfflinePushInfo = resp.OfflinePushInfo
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
return callbackResp
|
return callbackResp
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ func callbackBeforeSuperGroupOnlinePush(operationID string, groupID string, msg
|
|||||||
PlatformID: msg.SenderPlatformID,
|
PlatformID: msg.SenderPlatformID,
|
||||||
Platform: constant.PlatformIDToName(int(msg.SenderPlatformID)),
|
Platform: constant.PlatformIDToName(int(msg.SenderPlatformID)),
|
||||||
},
|
},
|
||||||
OfflinePushInfo: msg.OfflinePushInfo,
|
//OfflinePushInfo: msg.OfflinePushInfo,
|
||||||
ClientMsgID: msg.ClientMsgID,
|
ClientMsgID: msg.ClientMsgID,
|
||||||
SendID: msg.SendID,
|
SendID: msg.SendID,
|
||||||
GroupID: groupID,
|
GroupID: groupID,
|
||||||
@ -143,9 +143,9 @@ func callbackBeforeSuperGroupOnlinePush(operationID string, groupID string, msg
|
|||||||
if len(resp.UserIDList) != 0 {
|
if len(resp.UserIDList) != 0 {
|
||||||
*pushToUserList = resp.UserIDList
|
*pushToUserList = resp.UserIDList
|
||||||
}
|
}
|
||||||
if resp.OfflinePushInfo != nil {
|
//if resp.OfflinePushInfo != nil {
|
||||||
msg.OfflinePushInfo = resp.OfflinePushInfo
|
// msg.OfflinePushInfo = resp.OfflinePushInfo
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
log.NewDebug(operationID, utils.GetSelfFuncName(), pushToUserList, resp.UserIDList)
|
log.NewDebug(operationID, utils.GetSelfFuncName(), pushToUserList, resp.UserIDList)
|
||||||
return callbackResp
|
return callbackResp
|
||||||
|
@ -10,15 +10,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func SuperGroupNotification(operationID, sendID, recvID string) {
|
func SuperGroupNotification(operationID, sendID, recvID string) {
|
||||||
|
|
||||||
//var tips sdk.TipsComm
|
|
||||||
//var err error
|
|
||||||
//marshaler := jsonpb.Marshaler{
|
|
||||||
// OrigName: true,
|
|
||||||
// EnumsAsInts: false,
|
|
||||||
// EmitDefaults: false,
|
|
||||||
//}
|
|
||||||
//tips.JsonDetail, _ = marshaler.MarshalToString(m)
|
|
||||||
n := &NotificationMsg{
|
n := &NotificationMsg{
|
||||||
SendID: sendID,
|
SendID: sendID,
|
||||||
RecvID: recvID,
|
RecvID: recvID,
|
||||||
@ -27,11 +18,6 @@ func SuperGroupNotification(operationID, sendID, recvID string) {
|
|||||||
SessionType: constant.SingleChatType,
|
SessionType: constant.SingleChatType,
|
||||||
OperationID: operationID,
|
OperationID: operationID,
|
||||||
}
|
}
|
||||||
//n.Content, err = proto.Marshal(&tips)
|
|
||||||
//if err != nil {
|
|
||||||
// log.NewError(operationID, utils.GetSelfFuncName(), "proto.Marshal failed")
|
|
||||||
// return
|
|
||||||
//}
|
|
||||||
log.NewInfo(operationID, utils.GetSelfFuncName(), string(n.Content))
|
log.NewInfo(operationID, utils.GetSelfFuncName(), string(n.Content))
|
||||||
Notification(n)
|
Notification(n)
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ type CallbackBeforePushResp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CallbackBeforeSuperGroupOnlinePushReq struct {
|
type CallbackBeforeSuperGroupOnlinePushReq struct {
|
||||||
*commonPb.OfflinePushInfo
|
//*commonPb.OfflinePushInfo
|
||||||
UserStatusBaseCallback
|
UserStatusBaseCallback
|
||||||
ClientMsgID string `json:"clientMsgID"`
|
ClientMsgID string `json:"clientMsgID"`
|
||||||
SendID string `json:"sendID"`
|
SendID string `json:"sendID"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user