Changeset fb30b5d in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 07/21/2026 11:10:32 PM (7 weeks ago)
- Branches:
- main
- Children:
- 4c70ecb
- Parents:
- e2ea5c4
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
re2ea5c4 rfb30b5d 2434 2434 export function getTimeline(slug, limit, offset) { return tlStmts().list.all(slug, limit || 50, offset || 0); } 2435 2435 2436 // Inbox C2S read: a timeline row's media_json ([{url, type}], written on the 2437 // inbound Create) → AS2 `attachment` array, so a client (Shaer) can render a 2438 // friend's images/audio/video natively, exactly like own outbox posts. The 2439 // stored `type` is the mediaType and may be ''. Malformed JSON yields 2440 // undefined and never blocks the item. 2441 export function timelineAttachments(mediaJson) { 2442 try { 2443 const list = mediaJson ? JSON.parse(mediaJson) : []; 2444 const rows = (Array.isArray(list) ? list : []) 2445 .filter((m) => m && m.url) 2446 .map((m) => ({ type: 'Document', mediaType: m.type || undefined, url: m.url })); 2447 return rows.length ? rows : undefined; 2448 } catch { return undefined; } 2449 } 2450 2436 2451 // ── Cirkel = posts from the accounts you auto-boost ("feature an artist") ── 2437 2452 let _abCount, _cirkelPosts, _cirkelMembers; … … 3090 3105 getInteractions, getInteractionById, setInteractionBoosted, setInteractionLiked, setMyReaction, getMyReactions, buildReplyNote, getOutboxNote, deliverReply, resolveRemoteNote, 3091 3106 listOutbox, deliverOutboxDelete, deliverOutboxUpdate, deliverDirectNote, 3092 webfingerResolve, followActor, resolveRemoteActor, unfollowActor, listFollowing, setAutoBoost, backfillFromOutbox, getTimeline, sendInteraction, voteOnPoll, voteOnRemotePoll,3107 webfingerResolve, followActor, resolveRemoteActor, unfollowActor, listFollowing, setAutoBoost, backfillFromOutbox, getTimeline, timelineAttachments, sendInteraction, voteOnPoll, voteOnRemotePoll, 3093 3108 parseOwnPoll, pollTally, ownPollView, deliverPollUpdate, maybeCrawlThread, sendReport, localMentionSlugs, 3094 3109 autoBoostCount, boostedCount, markBoosted, unmarkBoosted, markLiked, unmarkLiked, getTimelineReaction, upsertBoostedNote, getCirkelPosts, getCirkelMembers, selfHealTimeline,
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)