Allow old-school username routes with ~
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user