Yes I think this is all doable. Will take a look in a few hours and get back to you.
Discussion
I believe it already works as you described. We first check if the user is authenticated with NIP-42. If so, we check if the event author == the authorized pubkey. If those match and we haven’t previously notified them on this connection, we then send the NOTIFY. It should not get triggered if the authenticated user rebroadcasts an event from a different author.
I’m adding the npub to the message now. Let me know if you notice something not working as described. It’s always possible I introduced some new issues supporting multiuser auth.
Small correction: we check if event author is IN authenticated pubkeys, since that is a list now.
Nice! Thanks for check. I will keep debugging.
Now with outbox, a lot of unpaid users will connect to these relays.
On another branch of this, I had this idea that the NOTIFY should only come to current subscribers that haven't paid this month yet.
Meaning that, I think it is hard for new users to see this message and decide to join the relay. They might not know anything about nostr.wine.. they just got it from a list somewhere... and then boom payment request. The jump is too high. New users might be better suited with an introduction to the service, maybe even via DMs to avoid the sudden popup.
Have you seen this work with brand new accounts? Meaning, you show the message and they actually pay?
I think it did work some originally, when users were physically adding the relay to their list or seeing it in their own list. I can’t imagine it will convert well if it is randomly appearing due to outbox with no previous knowledge of the nostr.wine relay.
Maybe the notify for new users should just drop the invoice completely and just have a link to the website and a brief description instead. DMs feel spammier for new usersbecause the user might not realize they ever connected to the relay and might just think we are soliciting.
Will think about this though. I think we should change the message and probably drop the invoice.
Just for new users, right? I think the invoice works great for current members. At least that is how I keep paying you.
Yes - just for new users!
In any case, I added a filter that the relay must have been manually inserted in people's lists in order to display the message. So, most of the NOTIFY from other people's outbox relays are being discared right now.
The only issue is on NIP-50 search. It was added by default for all new Amethyst accounts and that means that if NOTIFY happens and they have the search relay setup, it will display, even though they are not paying for the relay (and most likely don't know what nostr.wine is)