Uploading/undoing media modifies status text. Also: status text trimmed before validation
This commit is contained in:
parent
b1a670af8d
commit
c6d893a71d
3 changed files with 34 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue