From 60b4ea4643216d50f5455ac1207a253dbc3de2c1 Mon Sep 17 00:00:00 2001 From: Siddharth Singh Date: Mon, 24 Jun 2024 02:02:58 +0530 Subject: [PATCH] add config values for external nostr viewer back to source code --- src/config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/config.ts b/src/config.ts index 502544d8..f80e5eed 100644 --- a/src/config.ts +++ b/src/config.ts @@ -63,6 +63,14 @@ class Conf { static get localDomain(): string { return Deno.env.get('LOCAL_DOMAIN') || `http://localhost:${Conf.port}`; } + /** Link to an external nostr viewer. */ + static get externalDomain(): string { + return Deno.env.get('NOSTR_EXTERNAL') || 'https://njump.me'; + } + /** Get a link to a nip19-encoded entity in the configured external viewer. */ + static external(path: string) { + return new URL(path, Conf.externalDomain); + } /** * Heroku-style database URL. This is used in production to connect to the * database.