Mentioning nostr content

Learn how to mention nostr content in Habla

verbiricha

27. März 2023March 27, 2023 · 2 Min. Lesezeit2 min read · Aktualisiert am 13. Mai 2023Updated May 13, 2023

The recently merged NIP-27 introduces a new way for handling mentions in nostr text content. Instead of using the #[idx] and tags, mentions are now NIP-21 URIs.

Habla implements NIP-27 mentions and will no longer create content with NIP-08 mentions. When editing an article that contains NIP-08 mentions they will be automatically converted to NIP-27.

How do I mention an event?#

Add the nostr: prefix to a identifier like nevent1qqsxhr3hlkurt3ncrasgj4fx4p2yef92ml8403elunyhfe63raenk0sppemhxue69uhkummn9ekx7mp04p24wr and it'll be interpreted as a mention and rendered inline. The appropriate tags will also be added to the event.

Quoted note

note identifiers also work, but prefer nevent over note identifiers since they include relay information. This makes sure the content can be fetched by clients.

How do I mention a person?#

Use a persons npub with a nostr: prefix to mention and show their username inline: ⁠verbiricha

A nprofile identifier includes pubkey and relay information. These will be rendered as a card with the user and relay list: ⁠npub1gdjc4…fkq3

How do I mention a replaceable event?#

Replaceable events have a naddr identifier so you can use the same notation for mentioning them. This will work for articles like Quoted article or other kinds of events like badges

Quoted article

Lists are also replaceable events and can be referenced with an naddr:

Quoted article


Happy writing!

#nip-27#nostr

Written by

Comments

No comments yet. Start the conversation.

Contents

3 sections

  1. How do I mention an event?
  2. How do I mention a person?
  3. How do I mention a replaceable event?