diff --git a/apps/api/internal/realtime/hub.go b/apps/api/internal/realtime/hub.go index 17c118411..9c9453ba1 100644 --- a/apps/api/internal/realtime/hub.go +++ b/apps/api/internal/realtime/hub.go @@ -56,9 +56,3 @@ func (h *Hub) Publish(event store.Event) { } } } - -func (h *Hub) PublishMany(events []store.Event) { - for _, event := range events { - h.Publish(event) - } -} diff --git a/apps/api/internal/realtime/hub_test.go b/apps/api/internal/realtime/hub_test.go index bdaf7def8..42081dd2a 100644 --- a/apps/api/internal/realtime/hub_test.go +++ b/apps/api/internal/realtime/hub_test.go @@ -24,7 +24,7 @@ func TestHubSubscribePublishAndUnsubscribe(t *testing.T) { t.Fatal("timed out waiting for event") } - hub.PublishMany([]store.Event{{ID: "evt_2", WorkspaceID: "wsp_other"}}) + hub.Publish(store.Event{ID: "evt_2", WorkspaceID: "wsp_other"}) select { case got := <-events: t.Fatalf("unexpected event for other workspace: %#v", got)