use decodeURIComponent instead

This commit is contained in:
keyan 2023-02-14 19:04:05 -06:00
parent 93d4581360
commit 9f2c8d64bc
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ export default async ({ query: { username, amount, nostr } }, res) => {
// if nostr, decode, validate sig, check tags, set description hash
let description, descriptionHash
if (nostr) {
const noteStr = decodeURI(nostr)
const noteStr = decodeURIComponent(nostr)
const note = JSON.parse(noteStr)
const hasPTag = note.tags?.filter(t => t[0] === 'p').length >= 1
const hasETag = note.tags?.filter(t => t[0] === 'e').length <= 1