Fix NIP-27 mentions
This commit is contained in:
parent
b6b09d7b90
commit
540bd058a2
|
@ -1,5 +1,6 @@
|
||||||
import { NostrEvent, NSchema as n } from '@nostrify/nostrify';
|
import { NostrEvent, NSchema as n } from '@nostrify/nostrify';
|
||||||
import ISO6391 from 'iso-639-1';
|
import ISO6391 from 'iso-639-1';
|
||||||
|
import { nip19 } from 'nostr-tools';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { type AppController } from '@/app.ts';
|
import { type AppController } from '@/app.ts';
|
||||||
|
@ -111,7 +112,11 @@ const createStatusController: AppController = async (c) => {
|
||||||
pubkeys.add(pubkey);
|
pubkeys.add(pubkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
return `nostr:${pubkey}`;
|
try {
|
||||||
|
return `nostr:${nip19.npubEncode(pubkey)}`;
|
||||||
|
} catch {
|
||||||
|
return match;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Explicit addressing
|
// Explicit addressing
|
||||||
|
|
Loading…
Reference in New Issue