Add posting with limited visibility test
This commit is contained in:
parent
a9b22883dc
commit
385ac0c1a2
2 changed files with 22 additions and 0 deletions
|
@ -94,6 +94,7 @@ class PostStatusService < BaseService
|
|||
end
|
||||
|
||||
def load_circle
|
||||
raise ArgumentError if @options[:visibility] == 'limited' && @options[:circle_id].nil?
|
||||
return unless @options[:visibility] == 'circle' || (@options[:visibility] == 'limited' && @options[:circle_id].present?)
|
||||
|
||||
@circle = @options[:circle_id].present? && Circle.find(@options[:circle_id])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue