Watch party reader view: presented websites become clean text with per-device font size, landscape/portrait and an Original switch; SSRF-guarded server fetch

This commit is contained in:
Jonathan Sykes
2026-10-15 19:29:13 +08:00
parent 3f913de0c3
commit 1352ed9f29
8 changed files with 320 additions and 8 deletions

View File

@@ -71,6 +71,7 @@ import { createYtdlpPool } from './ytdlp-pool.js';
import { createWarmQueue } from './warm-queue.js';
import { registerDeepSearchRoutes } from './deep-search.js';
import { registerProfileRecoveryRoutes } from './profile-recovery.js';
import { registerReaderRoutes } from './reader.js';
import { dirname, join as pathJoin } from 'node:path';
import { createRequestMonitor, registerRequestMonitorRoutes } from './request-monitor.js';
import { registerP2pAdminRoutes } from './p2p-admin.js';
@@ -2305,6 +2306,7 @@ app.get('/api/user/data', async (c) => {
// ============================================================================
const remote = createRemoteHub({ requireSameNetwork: process.env.REMOTE_SAME_NETWORK === '1' });
const party = createPartyHub({ profileExists: async (name) => !!(await getProfile(name)) });
registerReaderRoutes(app, { presentUrlOf: (code) => party.presentUrl(code) });
// Running parties that invited this online profile (protected profiles need their secret).
app.get('/api/party/invites', async (c) => {
const name = (c.req.query('name') || '').trim().toLowerCase();