Skip to main content

tally

Function tally 

Source
pub fn tally(
    events: impl IntoIterator<Item = Event>,
    notes: &HashSet<EventId>,
    account: Option<PublicKey>,
) -> HashMap<EventId, Engagement>
Expand description

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.