translations: only translate kind 1s

Deepl-Savings: 8k/year
Reported-by: Semisol
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2024-04-22 16:58:20 -07:00
parent ba494f94ab
commit 2c9b280a04
1 changed files with 5 additions and 0 deletions

View File

@ -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.