From ba84b6d4d7b2e1ccdcbfcdd5e0d09fbfdb241f45 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 15 Mar 2019 04:36:41 +0100 Subject: Add `visibility` param to reblog REST API (#9851) Use async worker for creating reblog notification to improve performance --- app/models/status.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models') 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 } -- cgit