Changeset 6bd25d1 in Klonkt
- Timestamp:
- 06/24/2026 10:27:56 AM (3 months ago)
- Branches:
- main
- Children:
- 5bf63b7
- Parents:
- 69815b2
- Location:
- src
- Files:
-
- 2 added
- 2 edited
-
config/database.js (modified) (1 diff)
-
routes/activitypub.js (added)
-
server.js (modified) (2 diffs)
-
services/ActivityPubService.js (added)
Legend:
- Unmodified
- Added
- Removed
-
src/config/database.js
r69815b2 r6bd25d1 295 295 CREATE INDEX IF NOT EXISTS idx_post_likes_post ON post_likes(post_id); 296 296 `); 297 298 // ── ActivityPub (fediverse bridge) ────────────────────────── 299 // RSA keypair per actor (Mastodon-compatible HTTP Signatures; separate from 300 // the Cirkels Ed25519 keys). ap_followers = remote AP actors following us. 301 db.exec(` 302 CREATE TABLE IF NOT EXISTS ap_keys ( 303 slug TEXT PRIMARY KEY, 304 public_pem TEXT NOT NULL, 305 private_pem TEXT NOT NULL, 306 created_at DATETIME DEFAULT CURRENT_TIMESTAMP 307 ); 308 CREATE TABLE IF NOT EXISTS ap_followers ( 309 id INTEGER PRIMARY KEY AUTOINCREMENT, 310 slug TEXT NOT NULL, 311 actor_uri TEXT NOT NULL, 312 inbox TEXT, 313 shared_inbox TEXT, 314 created_at DATETIME DEFAULT CURRENT_TIMESTAMP, 315 UNIQUE(slug, actor_uri) 316 ); 317 CREATE INDEX IF NOT EXISTS idx_ap_followers_slug ON ap_followers(slug); 318 `); 297 319 } 298 320 -
src/server.js
r69815b2 r6bd25d1 64 64 import changelogRoutes from './routes/changelog.js'; 65 65 import ogRoutes from './routes/og.js'; 66 import apRoutes from './routes/activitypub.js'; 66 67 67 68 // SESSION_SECRET: use the env var if set. Otherwise auto-generate a strong one … … 223 224 app.use(federationRoutes); 224 225 226 // ActivityPub: WebFinger + /ap/* (site-agnostic, resolves the site by slug). 227 app.use(apRoutes); 228 225 229 // Themed OG cards (/og/:slug.png) — resolve the site by slug themselves, so they 226 230 // run before resolveSite and need no site context.
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)