mark pubsub type safe via generics (#15961)

This commit is contained in:
Klaus Post authored and GitHub committed 2022-10-28 10:55:42 -07:00
1 parent 6d22e74d11
commit 71954faa3a
11 files changed
+90 -104

No files matched your search

+2 -1
View File
@@ -29,6 +29,7 @@ import (
"github.com/minio/minio/internal/event"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/minio/internal/logger"
"github.com/minio/minio/internal/pubsub"
"github.com/minio/pkg/bucket/policy"
)
@@ -321,7 +322,7 @@ func sendEvent(args eventArgs) {
crypto.RemoveSensitiveEntries(args.Object.UserDefined)
crypto.RemoveInternalEntries(args.Object.UserDefined)
if globalHTTPListen.NumSubscribers(args.EventName) > 0 {
if globalHTTPListen.NumSubscribers(pubsub.MaskFromMaskable(args.EventName)) > 0 {
globalHTTPListen.Publish(args.ToEvent(false))
}