Merge pull request #3518 from vitorpamplona/claude/amethyst-trim-post-whitespace-t9xi5m

Trim message text before tagging in post ViewModels
This commit is contained in:
Vitor Pamplona
2026-07-10 16:25:54 -04:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
@@ -576,7 +576,7 @@ open class CommentPostViewModel :
private suspend fun createTemplate(): EventTemplate<out Event>? {
val tagger =
NewMessageTagger(
message = message.text.toString(),
message = message.text.toString().trim(),
dao = accountViewModel,
)
tagger.run()
@@ -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))