Fix NIP-27 mentions

This commit is contained in:
Alex Gleason 2024-05-19 11:33:59 -05:00
parent b6b09d7b90
commit 540bd058a2
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { NostrEvent, NSchema as n } from '@nostrify/nostrify';
import ISO6391 from 'iso-639-1';
import { nip19 } from 'nostr-tools';
import { z } from 'zod';
import { type AppController } from '@/app.ts';
@ -111,7 +112,11 @@ const createStatusController: AppController = async (c) => {
pubkeys.add(pubkey);
}
return `nostr:${pubkey}`;
try {
return `nostr:${nip19.npubEncode(pubkey)}`;
} catch {
return match;
}
});
// Explicit addressing