Changeset d7526bd in Klonkt for src/services
- Timestamp:
- 06/25/2026 05:20:29 AM (3 months ago)
- Branches:
- main
- Children:
- e951b7c
- Parents:
- 5a6a457
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r5a6a457 rd7526bd 153 153 cc: [`${aId}/followers`], 154 154 tag: Array.isArray(post.tags) ? post.tags.map((t) => ({ type: 'Hashtag', name: '#' + String(t).replace(/\s+/g, '') })) : [], 155 replies: `${id}/replies`, 155 156 }; 156 157 if (attachment.length) note.attachment = attachment; 157 158 return note; 159 } 160 161 // All reply note URIs on a local post (inbound fediverse replies + our own 162 // outbound replies) — backs the Note's `replies` Collection so remote servers 163 // can fetch the whole thread. 164 export function getReplyUris(base, postId) { 165 const out = []; 166 try { 167 for (const r of db.prepare("SELECT object_uri FROM ap_interactions WHERE kind = 'reply' AND post_id = ? AND object_uri != '' ORDER BY created_at").all(postId)) out.push(r.object_uri); 168 for (const r of db.prepare('SELECT id FROM ap_outbox WHERE post_id = ? ORDER BY rowid').all(postId)) out.push(`${base}/ap/notes/${r.id}`); 169 } catch { /* non-fatal */ } 170 return out; 158 171 } 159 172 … … 906 919 getNotifications, listBlocks, isBlockedAny, blockTarget, unblock, 907 920 deliverWithRetry, enqueueDelivery, processDeliveryQueue, startDeliveryWorker, 921 getReplyUris, 908 922 };
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)