mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-27 05:52:29 +08:00
cmd gci write \
-s standard \
-s default \
-s "prefix(github.com/openimsdk/open-im-server/v3)"
15 lines
277 B
Go
15 lines
277 B
Go
package webhook
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
|
)
|
|
|
|
func WithCondition(ctx context.Context, before *config.BeforeConfig, callback func(context.Context) error) error {
|
|
if !before.Enable {
|
|
return nil
|
|
}
|
|
return callback(ctx)
|
|
}
|