Skip to main content

Module models

Module models 

Source
Expand description

Notes and profiles, reduced to what the views show.

Structs§

Note
Something someone wrote, as a row shows it: a short text note (kind 1), a comment (kind 1111), or, at the top of a thread of comments, whatever they are about, as far as it is text. With the notes it quotes, as far as they were at hand.
Profile
What an author published about themselves (kind 0), as far as it is shown.
ReplyTo
Where a note stands in a conversation, when it is a reply (NIP-10).
Website
A web address someone gives as theirs.

Constants§

ABOUT_MAX_CHARS 🔒
How much of what someone says about themselves is kept. It is theirs to write, at any length.

Functions§

comment_reply_to 🔒
What a comment (kind 1111) answers: the event it names as its parent, under the event the comments are about. Comments on something that is no event (an article by its address, a web page) have no such root; the first comment then stands for it, and answers nothing.
display_name
The name someone goes by: the one in their profile, or a short form of their public key until (and unless) they have one.
note_reply_to 🔒
What the e tags of a text note say it replies to, if to anything.
reply_to 🔒
What event says it replies to, if to anything that can be named as a note is: a text note by its e tags (NIP-10), a comment by the tags of the comment it answers and of what the comments are about (NIP-22). An event of another kind replies to nothing, whatever it cites.
short_npub
A public key short enough to stand in for a name: npub1abcd…wxyz.