Expand description
Notification message handlers for Avestruz: finding out what others did that concerns the account, showing it, and keeping track of how much of it was looked at.
What names the account is read from the store when the account is
known, and asked of the relays after: its own, and the ones it reads
(see NostrService::notifications).
From then on the relays are
asked again each time the feed is looked at for new notes, for what
was written since. Scrolling the list towards its end asks for the
page before the oldest.
What is new is what was written after the notifications were last
looked at: one moment, kept in the settings for each account
(Config::notifications_seen).
Looking is having their page on show in an open popup. The moment is
moved to now when that begins and again when it ends, so that what
arrived meanwhile is not new the next time; what was new when it
began stays picked out for as long as the page is looked at
(NotificationsState::seen_before).
Zaps show once it is known which key the account’s wallet service
signs receipts with, which its Lightning address is asked once (see
crate::nostr::notifications).
Constants§
- CHECK_
OVERLAP 🔒 - How far back from the newest notification the relays are asked again when they are asked for what is new: events reach a relay some time after they say they were written.