Skip to main content

Module engagement

Module engagement 

Source
Expand description

Engagement message handlers for Avestruz: what was made of the notes on show, and the account’s own reactions and reposts.

Whenever notes come into a feed or a thread, the event store is asked how many answered, reposted, liked and zapped them, and the relays are asked the same, and whether they have the notes themselves: the ones that do are the relays a note was seen on. What was asked within the last couple of minutes is not asked again, so a refresh that brings the same notes costs nothing.

A reaction is a like or an emoji, chosen from what is offered under a note’s like: the emoji reacted with most, which are kept for that (see crate::emoji), or any there is.

A reaction or a repost shows at once and goes out behind it. Until a relay has taken it the note is remembered as carrying it, so that a count arriving in the meantime doesn’t take it off the screen; if no relay takes it, it is taken off, with the reason.

Constants§

ENGAGEMENT_FRESH 🔒
How long what was made of a note is taken as known, before it is asked again.