From e877b6cb8fdf841eab7b830a337047d1593e78d9 Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Tue, 6 Feb 2024 14:01:35 +0100 Subject: [PATCH] enhancement: allow sending multiple userIDs in one SSE event --- changelog/unreleased/allow-multiple-event-user-ids.md | 5 +++++ pkg/events/sse.go | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/allow-multiple-event-user-ids.md diff --git a/changelog/unreleased/allow-multiple-event-user-ids.md b/changelog/unreleased/allow-multiple-event-user-ids.md new file mode 100644 index 0000000000..fc04fcb2eb --- /dev/null +++ b/changelog/unreleased/allow-multiple-event-user-ids.md @@ -0,0 +1,5 @@ +Enhancement: allow sending multiple user ids in one sse event + +Sending multiple user ids in one sse event is now possible which reduces the number of sent events. + +https://github.com/cs3org/reva/pull/4501 diff --git a/pkg/events/sse.go b/pkg/events/sse.go index 34841c81f3..fa3459d9f5 100644 --- a/pkg/events/sse.go +++ b/pkg/events/sse.go @@ -4,9 +4,9 @@ import ( "encoding/json" ) -// SendSEE instructs the sse service to send a notification to a user +// SendSSE instructs the sse service to send one or multiple notifications type SendSSE struct { - UserID string + UserIDs []string Type string Message []byte }