Changeset f0a33e1 in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 08/10/2026 03:32:22 PM (4 weeks ago)
- Branches:
- main
- Children:
- 41de7cb
- Parents:
- 3bbf73d
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r3bbf73d rf0a33e1 4095 4095 // everywhere EXCEPT in the other's app (Robins melding, 30-7: "komt niet 4096 4096 // binnen bij de ander"). 4097 const REPLY_COLUMNS = ` 4098 i.object_uri, i.actor_uri, i.actor_name, i.actor_handle, i.actor_icon, i.actor_url, 4099 i.content, i.published, i.created_at, i.parent_uri, i.post_id, 4100 i.emoji_json, i.actor_emoji_json, i.media_json, i.quote_json, i.embed_json`; 4101 4102 /** Dezelfde antwoordrijen, maar op object-uri -- voor de verschil-lezing. */ 4103 export function replyRowsByUri(slug, uris) { 4104 const list = (uris || []).filter((u) => typeof u === 'string' && u); 4105 if (!list.length) return []; 4106 try { 4107 const holes = list.map(() => '?').join(','); 4108 return db.prepare(`SELECT ${REPLY_COLUMNS} FROM ap_interactions i 4109 JOIN posts p ON p.id = i.post_id 4110 JOIN sites s ON s.id = p.site_id 4111 WHERE s.slug = ? AND i.kind = 'reply' AND i.object_uri IN (${holes})`) 4112 .all(slug, ...list); 4113 } catch { return []; } 4114 } 4115 4116 /** Tijdlijnrijen op id, met dezelfde afgeleide liked/boosted als getTimeline. */ 4117 export function timelineRowsByIds(slug, ids) { 4118 const list = (ids || []).filter((u) => typeof u === 'string' && u); 4119 if (!list.length) return []; 4120 try { 4121 const holes = list.map(() => '?').join(','); 4122 const rows = db.prepare(`SELECT * FROM ap_timeline WHERE slug = ? AND id IN (${holes})`).all(slug, ...list); 4123 const reacties = getReactionsFor(slug, rows.map((r) => r.id)); 4124 for (const r of rows) { 4125 const x = reacties.get(r.id); 4126 r.liked = !!(x && x.liked); 4127 r.boosted = !!(x && x.boosted); 4128 } 4129 return rows; 4130 } catch { return []; } 4131 } 4132 4097 4133 export function getReplyMessages(slug, limit) { 4098 4134 try { 4099 4135 return db.prepare(` 4100 SELECT i.object_uri, i.actor_uri, i.actor_name, i.actor_handle, i.actor_icon, i.actor_url, 4101 i.content, i.published, i.created_at, i.parent_uri, i.post_id, 4102 i.emoji_json, i.actor_emoji_json, i.media_json, i.quote_json, i.embed_json 4136 SELECT ${REPLY_COLUMNS} 4103 4137 FROM ap_interactions i 4104 4138 JOIN posts p ON p.id = i.post_id … … 6391 6425 getInteractions, getInteractionById, setInteractionBoosted, setInteractionLiked, buildReplyNote, getOutboxNote, getSentNotes, deliverReply, resolveRemoteNote, noteAudience, mayReadNote, 6392 6426 listOutbox, deliverOutboxDelete, deliverOutboxUpdate, deliverDirectNote, 6393 webfingerResolve, followActor, resolveRemoteActor, unfollowActor, handleMoveInbox, moveAccount, listFollowing, setAutoBoost, backfillFromOutbox, getTimeline, getDirectMessages, messageRowsByUri, conversationHeads, conversationHistory, isoStamp, timelineAttachments, timelineEmojis, timelineObjectLinks, timelineQuote, timelineEmbed, applyQuoteProps, deliverToActor, sendInteraction, voteOnPoll, voteOnRemotePoll,6427 webfingerResolve, followActor, resolveRemoteActor, unfollowActor, handleMoveInbox, moveAccount, listFollowing, setAutoBoost, backfillFromOutbox, getTimeline, timelineRowsByIds, getDirectMessages, messageRowsByUri, replyRowsByUri, conversationHeads, conversationHistory, isoStamp, timelineAttachments, timelineEmojis, timelineObjectLinks, timelineQuote, timelineEmbed, applyQuoteProps, deliverToActor, sendInteraction, voteOnPoll, voteOnRemotePoll, 6394 6428 acceptGatedFollow, rejectGatedFollow, isWardGuardian, outboxAudience, sendFollowDecision, 6395 6429 gateOutgoingFollow, performApprovedFollow, recordGuardianEvent, listGuardianEvents, GUARDIAN_EVENT_KEEP,
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)