commit 2c9b280a04bd476be4bc39180fd0346dd6490110
parent ba494f94ab5cc6e09c032c3f555ca2aa8c746ccc
Author: William Casarin <jb55@jb55.com>
Date: Mon, 22 Apr 2024 16:58:20 -0700
translations: only translate kind 1s
Deepl-Savings: 8k/year
Reported-by: Semisol
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git 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.