From 2c9b280a04bd476be4bc39180fd0346dd6490110 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 22 Apr 2024 16:58:20 -0700 Subject: [PATCH] translations: only translate kind 1s Deepl-Savings: 8k/year Reported-by: Semisol Signed-off-by: William Casarin --- damus/Util/EventCache.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/damus/Util/EventCache.swift b/damus/Util/EventCache.swift index ad8493a4..3f6d5419 100644 --- a/damus/Util/EventCache.swift +++ b/damus/Util/EventCache.swift @@ -239,6 +239,11 @@ func should_translate(event: NostrEvent, our_keypair: Keypair, settings: UserSet guard settings.can_translate else { return false } + + // don't translate reposts, longform, etc + if event.kind != 1 { + return false; + } // Do not translate self-authored notes if logged in with a private key // as we can assume the user can understand their own notes.