db42's avatar
db42 7 months ago
#asknostr I’m confused, are we supposed to put “nostr:” before the naddr/nprofile/etc. in kind 1 notes? It seems like some clients parse it and others don’t.

Replies (11)

Not every client is yet handling prefixes in the same fashion. There is no right or wrong answer at the moment. The best you can do is apply the format that works in the client that you believe most of your followers are using.
I have taken to manually typing the "nostr:" prefix for all Nostr URIs since it is far more consistently handled by various clients. Leave it off and you may or may not get the desired result, depending on the client. That said, I think client devs should be better about recognizing and handling URIs that are missing the prefix. Can't really count on that, though.
db42's avatar
db42 7 months ago
Seems to be working better actually on primal Damus and yakihonne 🤷‍♂️
db42's avatar
db42 7 months ago
Yeah did type it in manually. But an app I’m working on didn’t seem to work correctly across those 3 clients when doing quote post with the “nostr:” in them. I’ll do some more testing.
Hey, thanks for sharing my article. I’m still learning what the best practices are so let me know if you know of any good resources. For example, I noticed in Primal when I copy the note ID, I get a string that begins with “nostr:nevent”; whereas in Damus, the string begins with “note1”. Which one is more preferable?
db42's avatar
db42 7 months ago
That’s a strange one. I believe in the nip specs it says to use “nostr:” so I think maybe Damus is incorrect in this case. But I’m sure they’re doing it that way for some reason.