Changeset 31288dc in Klonkt
- Timestamp:
- 10/26/2026 01:18:33 PM (26 hours ago)
- Branches:
- main
- Children:
- bfa3ba3
- Parents:
- 4ae254a
- Files:
-
- 2 added
- 2 edited
-
src/server.js (modified) (2 diffs)
-
src/services/ActivityPubService.js (modified) (2 diffs)
-
src/services/wake.js (added)
-
test/wake.test.js (added)
Legend:
- Unmodified
- Added
- Removed
-
src/server.js
r4ae254a r31288dc 70 70 import oauthRoutes from './routes/oauth.js'; 71 71 import { apWants, startDeliveryWorker, selfHealTimeline, migrateReactions } from './services/ActivityPubService.js'; 72 import { startWakeWatch } from './services/wake.js'; 72 73 73 74 // SESSION_SECRET: use the env var if set. Otherwise auto-generate a strong one … … 210 211 startScheduler(); // release planning: publish scheduled posts when publish_at is reached 211 212 startDeliveryWorker(); // retry failed fediverse deliveries with backoff 213 // Wakker worden na echte afwezigheid (shaer-xzab.4/.5): aankondigen en inhalen. 214 // Niet bij een gewone herstart; zie services/wake.js. 215 startWakeWatch(); 212 216 // Once per REACTIONS_MIGRATION_VERSION bump: reacties naar de tussentabel, onder 213 217 // de canonieke object-URI. Moet VOOR het serveren, want vanaf nu leest de code -
src/services/ActivityPubService.js
r4ae254a r31288dc 3199 3199 // history-from-before-you-followed or a delivery that was missed while you were down; 3200 3200 // reading the outbox is the spec-conform way to catch up. PULL ONLY — sends nothing. 3201 export async function backfillFromOutbox(slug, actorUri, limit = 20) { 3201 // 3202 // `since` (ms of een ISO-datum): alleen wat daarna gepubliceerd is. Voor het 3203 // inhalen na een afwezigheid (shaer-xzab.4): dan hoort niet de hele eerste 3204 // pagina erbij, alleen wat er sinds het wegvallen bij kwam. Een post zonder 3205 // datum telt dan niet mee -- van die weet je niet of hij gemist is. 3206 export async function backfillFromOutbox(slug, actorUri, limit = 20, { since = null } = {}) { 3202 3207 try { 3203 3208 if (!slug || !actorUri) return 0; … … 3223 3228 if (o.type && o.type !== 'Note' && o.type !== 'Article' && o.type !== 'Question') continue; // skip boosts/other 3224 3229 if (o.inReplyTo) continue; // top-level only 3230 if (since != null) { 3231 const t = Date.parse(o.published || ''); 3232 if (!Number.isFinite(t) || t < new Date(since).getTime()) continue; 3233 } 3225 3234 const auth = actorUriOf(o.attributedTo); 3226 3235 if (auth && auth !== actorUri) continue; // their OWN posts only
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)