diff options
Diffstat (limited to 'src/lib/parse.ts')
| -rw-r--r-- | src/lib/parse.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/parse.ts b/src/lib/parse.ts index f6405e4a..b4bf837c 100644 --- a/src/lib/parse.ts +++ b/src/lib/parse.ts @@ -8,6 +8,7 @@ export default async (s, host) => { if (!s) return; let t = s.trim(); let amount; + let invoice; let user; if (t.startsWith("http")) redirect(307, t); @@ -57,7 +58,6 @@ export default async (s, host) => { t = params.get("lightning"); } - let invoice; if (t.toLowerCase().startsWith("ln")) { try { invoice = await get(`/invoice/${t}`); @@ -71,6 +71,8 @@ export default async (s, host) => { } } + if (invoice) redirect(307, `/invoice/${invoice.id}`); + if (t.match(/^🥜([\uFE00-\uFE0F]|[\uE0100-\uE01EF]+)$/)) { t = Array.from(t) .slice(1) |
