about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index e336cfe62..ae5c4b496 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -89,4 +89,8 @@ class Status < ApplicationRecord
   def self.reblogs_map(status_ids, account_id)
     self.where(reblog_of_id: status_ids).where(account_id: account_id).map { |s| [s.reblog_of_id, true] }.to_h
   end
+
+  before_validation do
+    self.text.strip!
+  end
 end