Changeset 0cea12b in Klonkt
- Timestamp:
- 07/20/2026 08:19:20 PM (7 weeks ago)
- Branches:
- main
- Children:
- 81b2e1e
- Parents:
- 513ba82
- git-author:
- Robin <roboburr@…> (07/20/2026 08:18:21 PM)
- git-committer:
- Robin <roboburr@…> (07/20/2026 08:19:20 PM)
- Files:
-
- 1 added
- 4 edited
-
CHANGELOG.de.md (modified) (1 diff)
-
CHANGELOG.md (modified) (1 diff)
-
CHANGELOG.nl.md (modified) (1 diff)
-
src/routes/activitypub.js (modified) (1 diff)
-
test/c2s-inbox.test.js (added)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG.de.md
r513ba82 r0cea12b 7 7 8 8 ### Hinzugefügt 9 - **Die Inhaberin kann ihre Inbox über C2S lesen.** Ein GET auf die Inbox mit 10 dem eigenen Bearer liefert aktuelle eingegangene Beiträge (die Konten, denen 11 du folgst) als Create(Note)-Einträge, damit eine verbundene App (Shaer) einen 12 vereinten Feed bauen kann. Für alle anderen bleibt die Inbox write-only. 9 13 - **"Mehr laden" in den Feeds.** Solo (Start), Zirkel, Zeitung und Nachrichten 10 14 laden jetzt in Blöcken von 72 mit einem "Mehr laden"-Button statt einer harten -
CHANGELOG.md
r513ba82 r0cea12b 7 7 8 8 ### Added 9 - **The owner can read their inbox over C2S.** A GET on the inbox with the 10 account's own bearer returns recent inbound posts (the accounts you follow) 11 as Create(Note) items, so a connected app (Shaer) can build a unified feed. 12 For everyone else the inbox stays write-only. 9 13 - **"Load more" on the feeds.** Solo (home), Cirkel, News and Messages now page 10 14 in blocks of 72 with a "Load more" button instead of a hard cap, so older -
CHANGELOG.nl.md
r513ba82 r0cea12b 7 7 8 8 ### Toegevoegd 9 - **De eigenaar kan zijn inbox lezen via C2S.** Een GET op de inbox met de 10 eigen bearer geeft recente binnengekomen posts (de accounts die je volgt) als 11 Create(Note)-items, zodat een gekoppelde app (Shaer) een unified feed kan 12 bouwen. Voor alle anderen blijft de inbox write-only. 9 13 - **"Meer laden" op de feeds.** Solo (home), Cirkel, Krant en Berichten laden nu 10 14 in blokken van 72 met een "Meer laden"-knop in plaats van een harde limiet, dus -
src/routes/activitypub.js
r513ba82 r0cea12b 84 84 }); 85 85 86 // ── Inbox read (owner only, AP C2S) ─────────────────────────────── 87 // GET on the inbox is part of ActivityPub C2S: the account owner (a bearer 88 // scoped to this site) reads recent inbound posts (the timeline: accounts 89 // they follow) as Create(Note) items, so an app (Shaer) can build a unified 90 // feed. Anyone else gets 403; the inbox stays write-only for the public. 91 router.get('/ap/users/:slug/inbox', (req, res) => { 92 const auth = OAuth.verifyBearer(req.headers.authorization); 93 if (!auth || auth.site.slug !== req.params.slug) return res.status(403).end(); 94 const base = baseUrl(req); 95 const items = AP.getTimeline(auth.site.slug, 60).map((t) => ({ 96 id: `${t.id}#create`, 97 type: 'Create', 98 actor: t.author_uri, 99 published: t.published || t.created_at || undefined, 100 object: { 101 id: t.id, 102 type: 'Note', 103 attributedTo: t.author_uri, 104 content: t.content, 105 url: t.url || undefined, 106 published: t.published || t.created_at || undefined, 107 sensitive: !!t.nsfw, 108 summary: t.cw || undefined, 109 }, 110 })); 111 AP.sendAP(res, { 112 '@context': AP.AP_CONTEXT, 113 id: `${base}/ap/users/${auth.site.slug}/inbox`, 114 type: 'OrderedCollection', 115 totalItems: items.length, 116 orderedItems: items, 117 }); 118 }); 119 86 120 // ── Followers (count-only public, full for the owner) ───────────── 87 121 // A C2S bearer scoped to this site (the account owner) gets the real actor
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)