From 7ad0e4d9e90bb3f3180ed36c5d04cbd752e11158 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 8 May 2024 10:41:05 -0500 Subject: [PATCH] Relationships: fix blocks and mutes being switched --- src/views/mastodon/relationships.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/views/mastodon/relationships.ts b/src/views/mastodon/relationships.ts index 4cfbfc2..d358024 100644 --- a/src/views/mastodon/relationships.ts +++ b/src/views/mastodon/relationships.ts @@ -6,13 +6,11 @@ async function renderRelationship(sourcePubkey: string, targetPubkey: string) { { kinds: [3], authors: [sourcePubkey], limit: 1 }, { kinds: [3], authors: [targetPubkey], limit: 1 }, { kinds: [10000], authors: [sourcePubkey], limit: 1 }, - { kinds: [10000], authors: [targetPubkey], limit: 1 }, ]); const event3 = events.find((event) => event.kind === 3 && event.pubkey === sourcePubkey); const target3 = events.find((event) => event.kind === 3 && event.pubkey === targetPubkey); const event10000 = events.find((event) => event.kind === 10000 && event.pubkey === sourcePubkey); - const target10000 = events.find((event) => event.kind === 10000 && event.pubkey === targetPubkey); return { id: targetPubkey, @@ -20,9 +18,9 @@ async function renderRelationship(sourcePubkey: string, targetPubkey: string) { showing_reblogs: true, notifying: false, followed_by: target3 ? hasTag(target3?.tags, ['p', sourcePubkey]) : false, - blocking: event10000 ? hasTag(event10000.tags, ['p', targetPubkey]) : false, - blocked_by: target10000 ? hasTag(target10000.tags, ['p', sourcePubkey]) : false, - muting: false, + blocking: false, + blocked_by: false, + muting: event10000 ? hasTag(event10000.tags, ['p', targetPubkey]) : false, muting_notifications: false, requested: false, domain_blocking: false,