From acd83483085f024f6c6f1cee4167b7d60f6872a4 Mon Sep 17 00:00:00 2001 From: codytseng Date: Tue, 11 Feb 2025 11:08:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NoteStats/LikeButton.tsx | 8 +------- src/lib/draft-event.ts | 5 ----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/NoteStats/LikeButton.tsx b/src/components/NoteStats/LikeButton.tsx index d52ba9c8..39938f43 100644 --- a/src/components/NoteStats/LikeButton.tsx +++ b/src/components/NoteStats/LikeButton.tsx @@ -55,13 +55,7 @@ export default function LikeButton({ const targetRelayList = await client.fetchRelayList(event.pubkey) const reaction = createReactionDraftEvent(event) - const isProtected = isProtectedEvent(event) - if (isProtected) { - const seenOn = client.getSeenEventRelayUrls(event.id) - await publish(reaction, { specifiedRelayUrls: seenOn }) - } else { - await publish(reaction, { additionalRelayUrls: targetRelayList.read.slice(0, 3) }) - } + await publish(reaction, { additionalRelayUrls: targetRelayList.read.slice(0, 4) }) markNoteAsLiked(event.id) } catch (error) { console.error('like failed', error) diff --git a/src/lib/draft-event.ts b/src/lib/draft-event.ts index 629f3c3c..31baa97b 100644 --- a/src/lib/draft-event.ts +++ b/src/lib/draft-event.ts @@ -9,7 +9,6 @@ import { extractImagesFromContent, extractMentions, getEventCoordinate, - isProtectedEvent, isReplaceable } from './event' @@ -26,10 +25,6 @@ export function createReactionDraftEvent(event: Event): TDraftEvent { tags.push(hint ? ['a', getEventCoordinate(event), hint] : ['a', getEventCoordinate(event)]) } - if (isProtectedEvent(event)) { - tags.push(['-']) - } - return { kind: kinds.Reaction, content: '+',