Skip to main content

Module engagement

Module engagement 

Source
Expand description

What others made of a note: how many answered it, how many passed it on, how many reacted to it, and how much it was zapped; and what the account itself left on it: a repost, a reaction.

It is counted from the events that name the note: replies (kind 1), reposts (kinds 6 and 16, NIP-18), reactions (kind 7, NIP-25) and zap receipts (kind 9735, NIP-57). The count is of what the event store holds, which is what the relays were willing to send: for a note that went everywhere, less than everything.

Who they were is read from the same events (who_did): who reposted, who reacted and what with, who zapped and how much. So what a count names and who is listed under it agree.

Structs§

Doer
Someone who left something on a note, and what.
Engagement
What others made of one note.
Standing
How some notes stand, as far as one source knows: what was made of each, and which relays each was seen on, for those seen on any.

Enums§

Did
What one of them left on a note.
Left
Which of what others left on a note: what one of its counts is of.
Mark
What the account leaves on a note, and once only: it shows at once, and is published behind what shows.
Reaction
What a reaction says (NIP-25): that the note is liked, or an emoji.

Functions§

react
The reaction reaction to the event id, of kind kind, written by author, yet to be signed (NIP-25).
reaction_target 🔒
The note a reaction is to: the last one it names (NIP-25). None for a downvote, which is not counted for or against.
repost
A repost of event, yet to be signed (NIP-18): of kind 6 for a text note and of kind 16, naming the kind, for anything else. It carries the event whole, so that it can be shown without being looked for, unless its author asked that it go nowhere they didn’t send it (NIP-70). relay is one that has the event, for those who look anyway.
tally
What events make of each of notes, with account the one whose own reactions and reposts are told apart. Events about other notes, or of other kinds, count for nothing; someone who reacted twice reacted once, and someone who reposted twice reposted once. Of an account that reacted more than once, elsewhere, the reaction made last is its own.
who_did
Who left what on note, going by events, each of them once: the last first, for reposts and reactions, and whoever zapped most first. Someone who reposted twice reposted once; of someone who reacted more than once, it is the reaction made last; and what someone zapped in several goes is added up. A downvote is no reaction, here as in the count, and a zap of less than a sat is none.
zap 🔒
The note a zap receipt is for, and what was paid, in millisats: the amount of the invoice the receipt carries.
zap_request 🔒
The zap request a zap receipt carries, if it carries one that is what it says: signed by whoever it says paid.