Changeset c745659 in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 06/26/2026 11:25:14 PM (2 months ago)
- Branches:
- main
- Children:
- 3289a64
- Parents:
- eacd3d6
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
reacd3d6 rc745659 352 352 _delLA = db.prepare('DELETE FROM ap_interactions WHERE kind = ? AND post_id = ? AND actor_uri = ?'); 353 353 _delReply = db.prepare("DELETE FROM ap_interactions WHERE kind = 'reply' AND object_uri = ?"); 354 _listI = db.prepare('SELECT id, kind, object_uri, parent_uri, actor_uri, actor_name, actor_handle, actor_url, actor_icon, content, published, created_at FROM ap_interactions WHERE post_id = ? ORDER BY created_at ASC');354 _listI = db.prepare('SELECT id, kind, object_uri, parent_uri, actor_uri, actor_name, actor_handle, actor_url, actor_icon, content, published, created_at, acted_boost FROM ap_interactions WHERE post_id = ? ORDER BY created_at ASC'); 355 355 _getI = db.prepare('SELECT * FROM ap_interactions WHERE id = ?'); 356 356 _insO = db.prepare('INSERT INTO ap_outbox (id, site_slug, post_id, post_slug, in_reply_to, to_actor, to_handle, content, created_at) VALUES (?,?,?,?,?,?,?,?,CURRENT_TIMESTAMP)'); … … 362 362 363 363 export function getInteractionById(id) { return iStmts().getI.get(id); } 364 export function setInteractionBoosted(id, on) { 365 db.prepare('UPDATE ap_interactions SET acted_boost = ? WHERE id = ?').run(on ? 1 : 0, id); 366 } 364 367 365 368 const localPostExists = (id) => { try { return !!db.prepare('SELECT 1 FROM posts WHERE id = ?').get(id); } catch { return false; } }; … … 420 423 actor_name: r.actor_name, actor_handle: r.actor_handle, actor_url: r.actor_url, 421 424 actor_icon: r.actor_icon, content: r.content, created_at: r.published || r.created_at, 425 acted_boost: !!r.acted_boost, 422 426 children: [], 423 427 }); … … 1327 1331 buildActor, buildNote, buildCreate, buildOutbox, buildFollowers, buildFeatured, 1328 1332 followerCount, deliver, fetchActor, verifyRequest, handleInbox, deliverCreate, deliverDelete, deliverUpdate, deliverActorUpdate, resyncFeaturedPins, 1329 getInteractions, getInteractionById, buildReplyNote, getOutboxNote, deliverReply, resolveRemoteNote,1333 getInteractions, getInteractionById, setInteractionBoosted, buildReplyNote, getOutboxNote, deliverReply, resolveRemoteNote, 1330 1334 listOutbox, deliverOutboxDelete, 1331 1335 webfingerResolve, followActor, resolveRemoteActor, unfollowActor, listFollowing, setAutoBoost, getTimeline, sendInteraction,
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)