allow dangerously setting an absolute subscription id.

This commit is contained in:
fiatjaf
2025-05-02 15:20:15 -03:00
parent f23356ab45
commit b81a6382d9

View File

@@ -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 puts a label on the subscription (it is prepended to the automatic id) that is sent to relays.
Label string 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. // 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. // if it returns true the event will be discarded and not processed further.
CheckDuplicate func(id ID, relay string) bool CheckDuplicate func(id ID, relay string) bool