This commit is contained in:
Ren Amamiya
2023-10-03 16:24:09 +07:00
parent cdeb5afd28
commit 428d52f175
13 changed files with 146 additions and 161 deletions

View File

@@ -60,10 +60,16 @@ export function parser(eventContent: string) {
}
// boost
if (word.startsWith('$') && word.length > 1) {
if (word.startsWith('$prism') && word.length > 1) {
return word.replace(word, `~boost-${word}~`);
}
// nostr account references (depreciated)
if (word.startsWith('@npub1')) {
const npub = word.replace('@', '').replace(/[^a-zA-Z0-9 ]/g, '');
return word.replace(word, `~pub-${nip19.decode(npub).data}~`);
}
// nostr account references
if (word.startsWith('nostr:npub1') || word.startsWith('npub1')) {
const npub = word.replace('nostr:', '').replace(/[^a-zA-Z0-9 ]/g, '');