noogle: deal with subscriptions

This commit is contained in:
Believethehype
2024-03-11 15:08:08 +01:00
parent 57d4452ea8
commit 115c60b4f7
4 changed files with 98 additions and 23 deletions

View File

@@ -169,7 +169,7 @@ export async function get_zaps(ids){
}
if (tg[0] === "e") {
etag = tg[1]
console.log(request.pubkey)
//console.log(request.pubkey)
if (request.pubkey === localStorage.getItem("nostr-key")) {
zapsandreactions.find(x => x.id === etag).zappedbyUser = true
}
@@ -184,7 +184,6 @@ export async function get_zaps(ids){
for (let tag of entry.tags) {
if (tag.asVec()[0] === "e") {
console.log(entry.pubkey)
if (entry.author.toHex() === localStorage.getItem("nostr-key")) {
zapsandreactions.find(x => x.id === tag.asVec()[1]).reactedbyUser = true
}
@@ -201,12 +200,12 @@ export async function get_zaps(ids){
//zaps.push({profile: contentjson, author: entry.author.toHex(), createdAt: entry.createdAt});
}
catch(error){
console.log("error")
//console.log(error)
}
}
console.log(zapsandreactions)
//console.log(zapsandreactions)
return zapsandreactions