mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 22:18:06 +01:00
parent
5abb3d8150
commit
e48d3bfd01
1 changed files with 5 additions and 0 deletions
|
@ -124,6 +124,7 @@ class Status < ApplicationRecord
|
|||
before_validation :set_reblog
|
||||
before_validation :set_visibility
|
||||
before_validation :set_conversation
|
||||
before_validation :set_sensitivity
|
||||
|
||||
class << self
|
||||
def not_in_filtered_languages(account)
|
||||
|
@ -250,6 +251,10 @@ class Status < ApplicationRecord
|
|||
self.visibility = (account.locked? ? :private : :public) if visibility.nil?
|
||||
end
|
||||
|
||||
def set_sensitivity
|
||||
self.sensitive = sensitive || spoiler_text.present?
|
||||
end
|
||||
|
||||
def set_conversation
|
||||
self.reply = !(in_reply_to_id.nil? && thread.nil?) unless reply
|
||||
|
||||
|
|
Loading…
Reference in a new issue