mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Disallow making private posts quotable (#35780)
This commit is contained in:
parent
b0ce1ce49d
commit
a2cddb9eac
2 changed files with 34 additions and 0 deletions
|
|
@ -10,6 +10,10 @@ module Status::InteractionPolicyConcern
|
|||
followed: (1 << 3),
|
||||
}.freeze
|
||||
|
||||
included do
|
||||
before_validation :downgrade_quote_policy, if: -> { local? && !distributable? }
|
||||
end
|
||||
|
||||
def quote_policy_as_keys(kind)
|
||||
case kind
|
||||
when :automatic
|
||||
|
|
@ -52,4 +56,8 @@ module Status::InteractionPolicyConcern
|
|||
|
||||
:denied
|
||||
end
|
||||
|
||||
def downgrade_quote_policy
|
||||
self.quote_approval_policy = 0
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue