Allow old-school username routes with ~

This commit is contained in:
2024-10-21 00:05:50 +02:00
parent 0e5b4b1807
commit e14adffbc8
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ import { profilePageHtml } from "../html.ts"
const usernameHandler = async function (ctx: Context) {
const { request } = ctx;
const username = ctx.params.path.replace(/^@/, '');;
const username = ctx.params.path.replace(/^(@|~)/, "");
const pubkey = await lookupPubkeyByUsername(username);
if (!pubkey) {