From b81a6382d9bb80b0268c685c06fa5a510bc5ed4e Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Fri, 2 May 2025 15:20:15 -0300 Subject: [PATCH] allow dangerously setting an absolute subscription id. --- subscription.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subscription.go b/subscription.go index 31ac462..930aa1d 100644 --- a/subscription.go +++ b/subscription.go @@ -56,6 +56,9 @@ type SubscriptionOptions struct { // Label puts a label on the subscription (it is prepended to the automatic id) that is sent to relays. Label string + // ID sets the ID absolutely on a subscription. Do not touch unless you know what you're doing. + ID string + // CheckDuplicate is a function that, when present, is ran on events before they're parsed. // if it returns true the event will be discarded and not processed further. CheckDuplicate func(id ID, relay string) bool