Changeset 6a99668 in Klonkt for src/routes
- Timestamp:
- 07/30/2026 12:38:57 PM (6 weeks ago)
- Branches:
- main
- Children:
- 55eca8b
- Parents:
- f9b1c5c
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
rf9b1c5c r6a99668 280 280 }, 281 281 })); 282 // Newest first over both, so the app can keep treating this as one feed. 283 const items = [...posts, ...messages].sort((a, b) => String(b.published || '').localeCompare(String(a.published || ''))); 282 // Your OWN sent notes (replies and direct messages, ap_outbox): without 283 // them a reply existed everywhere except in your own app, Messages showed 284 // half a conversation, and a retry ran into the duplicate guard (Robins 285 // melding, 30-7). Served like the other legs: same shape, one parser. 286 const mine = AP.selfAuthor(base, auth.site); 287 const sent = AP.getSentNotes(base, auth.site, 60).map((n) => ({ 288 id: `${n.id}#create`, 289 type: 'Create', 290 actor: me, 291 published: n.published, 292 // The leading mention anchor is addressing, not prose (the DM leg strips 293 // it the same way); the Mention tags built from the full content stay. 294 object: { ...n, content: AP.stripLeadingMentions(n.content), 'shaer:author': mine }, 295 })); 296 // Newest first over all legs, so the app can keep treating this as one feed. 297 const items = [...posts, ...messages, ...sent].sort((a, b) => String(b.published || '').localeCompare(String(a.published || ''))); 284 298 AP.sendAP(res, { 285 299 '@context': AP.AP_CONTEXT,
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)