Changeset 5a6a457 in Klonkt for src/config/database.js


Ignore:
Timestamp:
06/25/2026 05:15:48 AM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
d7526bd
Parents:
99234c3
Message:

feat(fediverse): federate on save+scheduler, delivery retry-queue, music as listen-link

#1 Posts now federate to followers not only on create, but also when a draft/

scheduled post becomes published (editor save) and when the Scheduler flips a
scheduled post live — previously those silently didn't reach followers.

#2 Delivery retry-queue (ap_delivery): a failed delivery (down server/timeout) is

queued and retried with backoff (1/5/15/60/180/360 min, 6 tries) by a worker,
instead of fire-and-forget. Signing key re-derived from the slug, never stored.

#3 Music posts: audio shortcodes federate as a '🎵 listen on the site' link to the

post (protected player) instead of the raw mp3 — keeps Klonkt's audio friction
intact (no downloadable file handed to Mastodon).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config/database.js

    r99234c3 r5a6a457  
    389389    );
    390390    CREATE INDEX IF NOT EXISTS idx_ap_blocks_target ON ap_blocks(target);
     391    CREATE TABLE IF NOT EXISTS ap_delivery (
     392      id INTEGER PRIMARY KEY AUTOINCREMENT,
     393      slug TEXT NOT NULL,          -- our site/actor that signs the delivery
     394      inbox TEXT NOT NULL,         -- recipient inbox URL
     395      body TEXT NOT NULL,          -- the activity JSON to POST
     396      attempts INTEGER NOT NULL DEFAULT 0,
     397      next_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
     398      created_at DATETIME DEFAULT CURRENT_TIMESTAMP
     399    );
     400    CREATE INDEX IF NOT EXISTS idx_ap_delivery_due ON ap_delivery(next_at);
    391401  `);
    392402}
Note: See TracChangeset for help on using the changeset viewer.