feat: add ActivityPub integration - actor profiles, follow/unfollow, timeline items

- Add actor profile page with outbox fetcher for viewing AP actor posts
- Add follow/unfollow buttons on actor profile (delegates to AP plugin)
- Add AP actor link on item cards for posts from ActivityPub sources
- Add ensureActivityPubChannel() for auto-creating Fediverse channel
- Add AP-aware item storage with dedup, attachments, and categories
- Add CSS styles for actor profile cards and AP-specific UI elements
- Bump version to 1.0.31
This commit is contained in:
Ricardo
2026-02-19 18:11:37 +01:00
parent 5736f1306a
commit 8868dfcdcb
9 changed files with 826 additions and 48 deletions

View File

@@ -8,6 +8,7 @@ import { opmlController } from "./lib/controllers/opml.js";
import { readerController } from "./lib/controllers/reader.js";
import { handleMediaProxy } from "./lib/media/proxy.js";
import { startScheduler, stopScheduler } from "./lib/polling/scheduler.js";
import { ensureActivityPubChannel } from "./lib/storage/channels.js";
import { cleanupAllReadItems, createIndexes } from "./lib/storage/items.js";
import { webmentionReceiver } from "./lib/webmention/receiver.js";
import { websubHandler } from "./lib/websub/handler.js";
@@ -126,6 +127,9 @@ export default class MicrosubEndpoint {
readerRouter.get("/search", readerController.searchPage);
readerRouter.post("/search", readerController.searchFeeds);
readerRouter.post("/subscribe", readerController.subscribe);
readerRouter.get("/actor", readerController.actorProfile);
readerRouter.post("/actor/follow", readerController.followActorAction);
readerRouter.post("/actor/unfollow", readerController.unfollowActorAction);
readerRouter.post("/api/mark-read", readerController.markAllRead);
readerRouter.get("/opml", opmlController.exportOpml);
router.use("/reader", readerRouter);
@@ -184,6 +188,14 @@ export default class MicrosubEndpoint {
console.info("[Microsub] Database available, starting scheduler");
startScheduler(indiekit);
// Ensure system channels exist
ensureActivityPubChannel(indiekit).catch((error) => {
console.warn(
"[Microsub] ActivityPub channel creation failed:",
error.message,
);
});
// Create indexes for optimal performance (runs in background)
createIndexes(indiekit).catch((error) => {
console.warn("[Microsub] Index creation failed:", error.message);