Changeset d71ed03 in Klonkt for src/server.js


Ignore:
Timestamp:
06/26/2026 09:28:16 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
355364c
Parents:
1968592
Message:

feat(cirkel): auto-migrate legacy circle_links to auto-boost on boot (once)

A site that updates past the old Cirkels protocol would silently lose its cirkel
(circle_links no longer feed /cirkel, and no auto-boost follows existed yet).
autoMigrateCircles() runs once per instance at startup (guarded by a
circles_migrated_v1 flag, async, best-effort) and converts active circle_links
into AP follows with auto-boost — so sound-fabrics/deno/self-hosters self-heal
without the manual scripts/migrate-circles.mjs step.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/server.js

    r1968592 rd71ed03  
    5858import ogRoutes from './routes/og.js';
    5959import apRoutes from './routes/activitypub.js';
    60 import { apWants, startDeliveryWorker } from './services/ActivityPubService.js';
     60import { apWants, startDeliveryWorker, autoMigrateCircles } from './services/ActivityPubService.js';
    6161
    6262// SESSION_SECRET: use the env var if set. Otherwise auto-generate a strong one
     
    161161startScheduler(); // release planning: publish scheduled posts when publish_at is reached
    162162startDeliveryWorker(); // retry failed fediverse deliveries with backoff
     163autoMigrateCircles(); // one-time: convert legacy circle_links -> AP auto-boost follows
    163164
    164165// Safety net: guarantee that there is always a primary site (solo/hub/circle).
Note: See TracChangeset for help on using the changeset viewer.