|
|
|
@ -16,6 +16,7 @@ package group
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"github.com/OpenIMSDK/tools/log"
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"github.com/OpenIMSDK/protocol/constant"
|
|
|
|
@ -231,6 +232,7 @@ func CallbackAfterJoinGroup(ctx context.Context, req *group.JoinGroupReq) error
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func CallbackBeforeSetGroupInfo(ctx context.Context, req *group.SetGroupInfoReq) error {
|
|
|
|
|
defer log.ZDebug(ctx, "CallbackBeforeSetGroupInfo1")
|
|
|
|
|
if !config.Config.Callback.CallbackBeforeSetGroupInfo.Enable {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
@ -239,9 +241,6 @@ func CallbackBeforeSetGroupInfo(ctx context.Context, req *group.SetGroupInfoReq)
|
|
|
|
|
OperationID: mcontext.GetOperationID(ctx),
|
|
|
|
|
GroupID: req.GroupInfoForSet.GroupID,
|
|
|
|
|
GroupName: req.GroupInfoForSet.GroupName,
|
|
|
|
|
Notification: req.GroupInfoForSet.Notification,
|
|
|
|
|
Introduction: req.GroupInfoForSet.Introduction,
|
|
|
|
|
FaceURL: req.GroupInfoForSet.FaceURL,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if req.GroupInfoForSet.Ex != nil {
|
|
|
|
@ -256,7 +255,7 @@ func CallbackBeforeSetGroupInfo(ctx context.Context, req *group.SetGroupInfoReq)
|
|
|
|
|
if req.GroupInfoForSet.ApplyMemberFriend != nil {
|
|
|
|
|
callbackReq.ApplyMemberFriend = &req.GroupInfoForSet.ApplyMemberFriend.Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
defer log.ZDebug(ctx, "CallbackBeforeSetGroupInfo2")
|
|
|
|
|
resp := &callbackstruct.CallbackBeforeSetGroupInfoResp{}
|
|
|
|
|
|
|
|
|
|
if err := http.CallBackPostReturn(ctx, config.Config.Callback.CallbackUrl, callbackReq, resp, config.Config.Callback.CallbackBeforeSetGroupInfo); err != nil {
|
|
|
|
@ -290,9 +289,6 @@ func CallbackAfterSetGroupInfo(ctx context.Context, req *group.SetGroupInfoReq)
|
|
|
|
|
OperationID: mcontext.GetOperationID(ctx),
|
|
|
|
|
GroupID: req.GroupInfoForSet.GroupID,
|
|
|
|
|
GroupName: req.GroupInfoForSet.GroupName,
|
|
|
|
|
Notification: req.GroupInfoForSet.Notification,
|
|
|
|
|
Introduction: req.GroupInfoForSet.Introduction,
|
|
|
|
|
FaceURL: req.GroupInfoForSet.FaceURL,
|
|
|
|
|
}
|
|
|
|
|
if req.GroupInfoForSet.Ex != nil {
|
|
|
|
|
callbackReq.Ex = &req.GroupInfoForSet.Ex.Value
|
|
|
|
|