diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/CommentPostViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/CommentPostViewModel.kt index f680c7183e..d89c1f38fe 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/CommentPostViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/CommentPostViewModel.kt @@ -576,7 +576,7 @@ open class CommentPostViewModel : private suspend fun createTemplate(): EventTemplate? { val tagger = NewMessageTagger( - message = message.text.toString(), + message = message.text.toString().trim(), dao = accountViewModel, ) tagger.run() diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/ShortNotePostViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/ShortNotePostViewModel.kt index f623c7f489..14a0a740de 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/ShortNotePostViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/ShortNotePostViewModel.kt @@ -1101,7 +1101,7 @@ open class ShortNotePostViewModel : val tagger = NewMessageTagger( - message.text.toString(), + message.text.toString().trim(), pTags, eTags, accountViewModel, @@ -1126,7 +1126,7 @@ open class ShortNotePostViewModel : // NIP-29 kind-11 group thread. The title is the required subject field (no first-line // fallback); the body is the full message. Scoped to the group by `h`; the host relay // authorizes the write. - ThreadEvent.build(tagger.message.trim(), subjectValue) { + ThreadEvent.build(tagger.message, subjectValue) { hTag(threadTarget.groupId) hashtags(findHashtags(tagger.message))