Browse Source

trim whitespace when posting

profile-edit
William Casarin 2 years ago
parent
commit
9efc900851
  1. 3
      damus/Views/PostView.swift

3
damus/Views/PostView.swift

@ -42,7 +42,8 @@ struct PostView: View {
if replying_to?.known_kind == .chat {
kind = .chat
}
let new_post = NostrPost(content: self.post, references: references, kind: kind)
let content = self.post.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
let new_post = NostrPost(content: content, references: references, kind: kind)
NotificationCenter.default.post(name: .post, object: NostrPostResult.post(new_post))
dismiss()

Loading…
Cancel
Save