mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
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:
+1
-1
@@ -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()
|
||||
|
||||
+2
-2
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user