NIP-01 is a little ambiguous around REQ messages. One part of the nip says "(...) a new `REQ` is sent using the same ``, in which case relay MUST overwrite the previous subscription."

And the other part regarding CLOSED messages gives an example of one being sent when a REQ is received having the same subscription id.

Which one is it? are REQs like replaceable events? #asknostr

Reply to this note

Please Login to reply.

Discussion

It's unclear to me what relays implement, I'm not sure even about my own relay. Once we find that out we must update the NIP.

I'll start looking at different implementations and see what I find.

I just assume the relay ignores duplicate subids. This is reasonable to me

What about when you unfollow someone? Wouldn't that require a REQ update? Ignoring duplicate subids would mean you would need to close the REQ and open a new one no?

You could just keep the REQ running and filter out unfollowed people locally.

And when you follow someone and want to load their notes from that same relay you could maybe close the first REQ and start a new one with "since": with the new pubkey added -- and maybe do a separate REQ for fetching old notes from that newly followed pubkey.