closeEventsSubscription method
This method will close the subscription of the subscriptionId
that you passed to it.
You can use after calling the startEventsSubscription method to close the subscription of the subscriptionId
that you passed to it.
example:
Nostr.instance.relays.closeEventsSubscription("<subscriptionId>");
Implementation
@override
void closeEventsSubscription(String subscriptionId) {
final close = NostrRequestClose(
subscriptionId: subscriptionId,
);
final serialized = close.serialized();
_runFunctionOverRelationIteration(
(relay) {
relay.socket.add(serialized);
utils.log(
'Close request with subscription id: $subscriptionId is sent to relay with url: ${relay.url}',
);
},
);
}