Default nitterInstanceUrl to the public nitter.net instance

An empty default meant every fresh install started with no Nitter
instance configured at all, so the first Nitter source's prefill had
nothing to draw from. Default to nitter.net instead, a widely-used
public instance, while leaving the field fully editable for anyone who
wants to point at a self-hosted mirror or another public instance.
This commit is contained in:
Claude
2026-07-26 22:58:36 +00:00
parent 2714441a62
commit b30657a161
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -183,7 +183,7 @@ export function migrate() {
storage_cap_unit TEXT NOT NULL DEFAULT 'GB',
nitter_media_mode TEXT NOT NULL DEFAULT 'proxy', -- self-host | proxy | direct
fxtwitter_base_url TEXT NOT NULL DEFAULT 'https://api.fxtwitter.com',
nitter_instance_url TEXT NOT NULL DEFAULT '', -- admin's preferred instance, prefills new Nitter sources (Connections tab)
nitter_instance_url TEXT NOT NULL DEFAULT 'https://nitter.net', -- admin's preferred instance, prefills new Nitter sources (Connections tab)
telegram_media_mode TEXT NOT NULL DEFAULT 'self-host', -- self-host | proxy (no "direct" — Telegram has no public hotlinkable media URL)
widget_weather_enabled INTEGER NOT NULL DEFAULT 1,
widget_stocks_enabled INTEGER NOT NULL DEFAULT 1,
@@ -313,7 +313,7 @@ export function migrate() {
db.exec("ALTER TABLE global_settings ADD COLUMN fxtwitter_base_url TEXT NOT NULL DEFAULT 'https://api.fxtwitter.com'");
}
if (!hasColumn('global_settings', 'nitter_instance_url')) {
db.exec("ALTER TABLE global_settings ADD COLUMN nitter_instance_url TEXT NOT NULL DEFAULT ''");
db.exec("ALTER TABLE global_settings ADD COLUMN nitter_instance_url TEXT NOT NULL DEFAULT 'https://nitter.net'");
}
if (!hasColumn('categories', 'is_private')) {
db.exec('ALTER TABLE categories ADD COLUMN is_private INTEGER NOT NULL DEFAULT 0');
+1 -1
View File
@@ -279,7 +279,7 @@ export interface GlobalSettings {
nitterMediaMode: 'self-host' | 'proxy' | 'direct';
/** Base URL of the fxtwitter-compatible enrichment API — defaults to the public instance, overridable for a self-hosted FixTweet mirror. */
fxtwitterBaseUrl: string;
/** Preferred Nitter instance, admin-set in Connections — prefills new Nitter sources' feed URL (SourcesTab.svelte) rather than being fetched from directly; each source's own URL is still what's actually polled. Empty until an admin picks one. */
/** Preferred Nitter instance, admin-set in Connections — prefills new Nitter sources' feed URL (SourcesTab.svelte) rather than being fetched from directly; each source's own URL is still what's actually polled. Defaults to the public nitter.net instance. */
nitterInstanceUrl: string;
/** How Telegram message media (attached photos/videos, channel avatars) is served — see pipeline/publish.ts's resolveTelegramMedia. No "direct" option: Telegram has no public hotlinkable media URL, bytes only come from the authenticated MTProto session. */
telegramMediaMode: 'self-host' | 'proxy';