Add validation of media attachments, clean up mastodon-own exception classes
This commit is contained in:
parent
063432d7e3
commit
5f511324b6
8 changed files with 22 additions and 22 deletions
|
@ -10,7 +10,7 @@ class FollowService < BaseService
|
|||
target_account = FollowRemoteAccountService.new.call(uri)
|
||||
|
||||
raise ActiveRecord::RecordNotFound if target_account.nil? || target_account.id == source_account.id || target_account.suspended?
|
||||
raise Mastodon::NotPermitted if target_account.blocking?(source_account) || source_account.blocking?(target_account)
|
||||
raise Mastodon::NotPermittedError if target_account.blocking?(source_account) || source_account.blocking?(target_account)
|
||||
|
||||
if target_account.locked?
|
||||
request_follow(source_account, target_account)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue