fix: 🐛
This commit is contained in:
parent
c62a82f673
commit
6bc2fde314
5 changed files with 10 additions and 5 deletions
|
|
@ -35,6 +35,9 @@ export function userIdToPubkey(userId: string) {
|
|||
if (userId.startsWith('npub1')) {
|
||||
const { data } = nip19.decode(userId as `npub1${string}`)
|
||||
return data
|
||||
} else if (userId.startsWith('nprofile1')) {
|
||||
const { data } = nip19.decode(userId as `nprofile1${string}`)
|
||||
return data.pubkey
|
||||
}
|
||||
return userId
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue