about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-03-15 04:36:41 +0100
committerGitHub <noreply@github.com>2019-03-15 04:36:41 +0100
commitba84b6d4d7b2e1ccdcbfcdd5e0d09fbfdb241f45 (patch)
treedf510bf1efe17af68a5cfd9a1536c8bd21b9c46e /app/models/status.rb
parent317c43b75be027f971c1c7e28890fdd37b63e931 (diff)
Add `visibility` param to reblog REST API (#9851)
Use async worker for creating reblog notification to improve performance
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index f33130dd6..d029ff3cd 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -70,6 +70,7 @@ class Status < ApplicationRecord
   validates_with StatusLengthValidator
   validates_with DisallowedHashtagsValidator
   validates :reblog, uniqueness: { scope: :account }, if: :reblog?
+  validates :visibility, exclusion: { in: %w(direct limited) }, if: :reblog?
   validates_associated :owned_poll
 
   default_scope { recent }