use decodeURIComponent instead
This commit is contained in:
parent
93d4581360
commit
9f2c8d64bc
@ -15,7 +15,7 @@ export default async ({ query: { username, amount, nostr } }, res) => {
|
|||||||
// if nostr, decode, validate sig, check tags, set description hash
|
// if nostr, decode, validate sig, check tags, set description hash
|
||||||
let description, descriptionHash
|
let description, descriptionHash
|
||||||
if (nostr) {
|
if (nostr) {
|
||||||
const noteStr = decodeURI(nostr)
|
const noteStr = decodeURIComponent(nostr)
|
||||||
const note = JSON.parse(noteStr)
|
const note = JSON.parse(noteStr)
|
||||||
const hasPTag = note.tags?.filter(t => t[0] === 'p').length >= 1
|
const hasPTag = note.tags?.filter(t => t[0] === 'p').length >= 1
|
||||||
const hasETag = note.tags?.filter(t => t[0] === 'e').length <= 1
|
const hasETag = note.tags?.filter(t => t[0] === 'e').length <= 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user