Changeset a6d703a in Klonkt for docs


Ignore:
Timestamp:
08/07/2026 08:52:43 AM (5 weeks ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
2d38b22
Parents:
4f322bc
git-author:
Robin <roboburr@…> (08/07/2026 08:52:41 AM)
git-committer:
roboburr <roboburr@…> (08/07/2026 08:52:43 AM)
Message:

Het wachten gedocumenteerd, inclusief waarom er geen achtergrondkanaal is

De verwijzing naar een push-notitie wees nergens heen; die notitie bestond niet.
Nu wel, want het is precies wat een client-bouwer moet weten: web push met VAPID
kan een zelfgehoste instance helemaal zelf, maar alleen naar een browser of een
geinstalleerde PWA. Een native app krijgt push via APNs, ondertekend met de
sleutel van de APPLICATIE, en die heeft een zelfgehoste Klonkt niet en hoort hij
ook niet te hebben.

Daarmee is het wachten op de inbox voor een zelfgehoste opzet geen tussenoplossing
tot er push komt, maar voorlopig HET verse kanaal.

Co-Authored-By: Claude Opus 5 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/shaer-c2s-api.md

    r4f322bc ra6d703a  
    8080| `GET /ap/users/:slug/outbox` | OrderedCollection of the account's own `Create(Note)` |
    8181| `GET /ap/users/:slug/inbox` | OrderedCollection of recent inbound posts (accounts you follow) as `Create(Note)`. Owner only; `403` for anyone else. The unified home feed is outbox + inbox merged. |
     82
     83### Waiting for news on the inbox read
     84
     85The inbox read can hold the answer until there is something new, so a client does
     86not have to poll. It is the **same call and the same response** — no separate
     87endpoint and no separate "there is news" shape, because a second shape is a
     88second description of a post that can drift from the first.
     89
     90```
     91GET /ap/users/:slug/inbox?since=<cursor>&wait=25
     92```
     93
     94- `since` is the `shaer:cursor` from your previous answer. Treat it as opaque.
     95- `wait` is seconds, capped at 50 — well under what a proxy will hold.
     96- Send neither and the route behaves exactly as it always did.
     97
     98The answer arrives as soon as anything the inbox would show has changed, or when
     99`wait` runs out — whichever comes first. Either way it is the full, current
     100collection with a fresh `shaer:cursor`. An empty-handed return is not an error:
     101it means nothing happened, ask again.
     102
     103The cursor moves for **all four** sources this read merges: the timeline,
     104messages, replies on your own posts, and your own sent notes.
     105
     106Limits worth knowing as a client author:
     107
     108- four waiting connections per account. A fifth gets the current state
     109  immediately rather than an error, so a broken reconnect loop degrades to
     110  ordinary polling instead of locking the account out.
     111- hanging up ends the wait; there is no cost to abandoning a request.
     112- the bearer is checked *before* any waiting, so an unauthenticated caller can
     113  never hold a connection open.
     114
     115This works while your app is in the foreground, and only there. iOS freezes
     116network activity the moment an app is backgrounded, and a held-open connection
     117does not survive it.
     118
     119**There is no background channel to fall back on for a native app.** Klonkt's
     120web push uses VAPID, which a self-hosted instance can generate and send entirely
     121on its own — but only to a browser or an installed PWA. A native app receives
     122push through APNs (or FCM), signed with the *application's* key, which a
     123self-hosted Klonkt does not have and should not have: whoever holds it can push
     124to every user of that app. Closing that gap needs a relay run by the app's
     125publisher, and that is a decision about money and control, not a protocol
     126detail.
     127
     128So for a self-hosted setup this is not a stopgap until push arrives. For now it
     129is the freshness channel.
    82130| `GET /ap/users/:slug/followers` | see below |
    83131| `GET /ap/users/:slug/following` | see below |
Note: See TracChangeset for help on using the changeset viewer.