Expand description
Message handlers for Avestruz.
Every handler is a method on AppModel,
called from the one match in crate::app. A handler changes the
model at once, and returns a Task for whatever takes time, whose
answer comes back as another message. Nothing else changes the model.
flowchart LR
message["A Message"] --> update["app: update"]
update --> handler["One handler"]
handler -->|"at once"| model[("The model")]
handler -->|"returns"| task["A Task: the store, a relay, the signer, the web"]
task -->|"its answer, as a Message"| updateThey are split by what happens:
| Module | What it handles |
|---|---|
auth | Signing in with a key, signing out, restoring the account at startup |
bookmarks | What the account has bookmarked, and bookmarking a note |
compose | Writing a note, a reply or a quote, keeping drafts, and publishing |
engagement | What was made of the notes on show, and liking and reposting them |
feed | Loading the feed and other lists of notes, paging into the past, and authors’ profiles |
images | Fetching the pictures views ask for |
keys | The keyboard, on a list: stepping through its rows, opening the one it is at, showing the notes that wait, going back |
media | The account’s media servers, and attaching files to what is being written |
navigation | The popup, which view it shows, the pages opened over the feed, and showing a long note in full where it is |
notifications | What others did that concerns the account, and how much of it was looked at |
previews | Asking the web pages notes link to what they say of themselves |
profile | Opening someone’s profile, and following them |
relays | The account’s relays: reading its lists, changing them, and saving them |
screenshot | Taking a picture of the popup, from the popup, and writing it to the pictures folder |
search | Searching for people and notes, and opening what is typed by its address |
settings | Changing settings, and taking changes made elsewhere |
share | Copying a link to a note that anyone can open |
store | Having the event store let go of what is old, once a day |
thread | Opening a note’s thread, and gathering its conversation |
video | Playing a video a note links to, and finding what there is to play of a YouTube one |
zap | Zapping a note: asking for the invoice, and waiting for its receipt |
What several of them do together, in order, is in
crate::guide::flows.
Modules§
- auth
- Authentication message handlers for Avestruz.
- bookmarks
- Bookmark message handlers for Avestruz: what the account has bookmarked, and bookmarking a note or taking its bookmark off.
- compose
- Composer message handlers for Avestruz.
- engagement
- Engagement message handlers for Avestruz: what was made of the notes on show, and the account’s own reactions and reposts.
- feed
- Feed message handlers for Avestruz.
- images
- Image message handlers for Avestruz.
- keys
- The keyboard, on a list: stepping through its rows, opening the one the keyboard is at, showing the notes that wait, and going back.
- media
- The account’s media servers, and attaching files to what is being written.
- navigation
- Navigation message handlers for Avestruz.
- notifications
- 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.
- previews
- Link preview message handlers for Avestruz.
- profile
- Profile message handlers for Avestruz.
- relays
- The account’s relays: where it writes, where it reads and where it searches, shown as its lists have them and changed there.
- screenshot
- A picture of the popup, taken by the popup itself: Ctrl+Shift+S.
- search
- Searching for people and notes.
- settings
- Settings message handlers for Avestruz.
- share
- Sharing a note: copying a link to it that anyone can open.
- store
- Store message handlers for Avestruz: having the event store let go of
what it has kept for longer than the settings say (see
crate::nostr::sweep). - thread
- Thread message handlers for Avestruz.
- video
- Video message handlers for Avestruz.
- zap
- Zap message handlers for Avestruz.