From 5deb9af477b8f153c123c5f80cb428a5350251b8 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 25 Mar 2024 16:41:52 -0400 Subject: [PATCH] Avoids publishing with two equal hashtags. --- .../java/com/vitorpamplona/quartz/events/TextNoteEvent.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quartz/src/main/java/com/vitorpamplona/quartz/events/TextNoteEvent.kt b/quartz/src/main/java/com/vitorpamplona/quartz/events/TextNoteEvent.kt index 13f81f043..6088a8678 100644 --- a/quartz/src/main/java/com/vitorpamplona/quartz/events/TextNoteEvent.kt +++ b/quartz/src/main/java/com/vitorpamplona/quartz/events/TextNoteEvent.kt @@ -100,8 +100,11 @@ class TextNoteEvent( ) } findHashtags(msg).forEach { + val lowercaseTag = it.lowercase() tags.add(arrayOf("t", it)) - tags.add(arrayOf("t", it.lowercase())) + if (it != lowercaseTag) { + tags.add(arrayOf("t", it.lowercase())) + } } extraTags?.forEach { tags.add(arrayOf("t", it)) } zapReceiver?.forEach {