diff options
author | Holly 'Frinkel' Lotor <admin@frinkel.tech> | 2020-01-20 21:14:05 +0000 |
---|---|---|
committer | Holly 'Frinkel' Lotor <admin@frinkel.tech> | 2020-01-20 16:58:12 -0500 |
commit | 7dc114f5895905151d7d903b1adb6928da46a45a (patch) | |
tree | c2d195213a8514f5c020d9927b3386bb976d4d06 /app/services | |
parent | e37c5a967af4b9c4338df709646375ea427f157e (diff) |
More smoke testing, I believe the stability is passable now
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/after_block_domain_from_account_service.rb | 2 | ||||
-rw-r--r-- | app/services/authorize_follow_service.rb | 2 | ||||
-rw-r--r-- | app/services/block_service.rb | 2 | ||||
-rw-r--r-- | app/services/follow_service.rb | 4 | ||||
-rw-r--r-- | app/services/reject_follow_service.rb | 2 | ||||
-rw-r--r-- | app/services/resolve_account_service.rb | 2 | ||||
-rw-r--r-- | app/services/unblock_service.rb | 2 | ||||
-rw-r--r-- | app/services/unfavourite_service.rb | 2 | ||||
-rw-r--r-- | app/services/unfollow_service.rb | 4 |
9 files changed, 11 insertions, 11 deletions
diff --git a/app/services/after_block_domain_from_account_service.rb b/app/services/after_block_domain_from_account_service.rb index a87c2e792..343e7ec11 100644 --- a/app/services/after_block_domain_from_account_service.rb +++ b/app/services/after_block_domain_from_account_service.rb @@ -31,7 +31,7 @@ class AfterBlockDomainFromAccountService < BaseService def reject_follow!(follow) follow.destroy - return unless follow.account.activitypub? +# return unless follow.account.activitypub? ActivityPub::DeliveryWorker.perform_async(Oj.dump(serialize_payload(follow, ActivityPub::RejectFollowSerializer)), @account.id, follow.account.inbox_url) end diff --git a/app/services/authorize_follow_service.rb b/app/services/authorize_follow_service.rb index 49bef727e..116532f66 100644 --- a/app/services/authorize_follow_service.rb +++ b/app/services/authorize_follow_service.rb @@ -11,7 +11,7 @@ class AuthorizeFollowService < BaseService follow_request.authorize! end - create_notification(follow_request) if !source_account.local? && source_account.activitypub? + create_notification(follow_request) if !source_account.local? follow_request end diff --git a/app/services/block_service.rb b/app/services/block_service.rb index da06361c2..4d756afb8 100644 --- a/app/services/block_service.rb +++ b/app/services/block_service.rb @@ -13,7 +13,7 @@ class BlockService < BaseService block = account.block!(target_account) BlockWorker.perform_async(account.id, target_account.id) - create_notification(block) if !target_account.local? && target_account.activitypub? + create_notification(block) if !target_account.local? block end diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb index e3f4bf19d..7b714bfb2 100644 --- a/app/services/follow_service.rb +++ b/app/services/follow_service.rb @@ -13,7 +13,7 @@ class FollowService < BaseService target_account = ResolveAccountService.new.call(target_account, skip_webfinger: true) raise ActiveRecord::RecordNotFound if target_account.nil? || target_account.id == source_account.id || target_account.suspended? - raise Mastodon::NotPermittedError if target_account.blocking?(source_account) || source_account.blocking?(target_account) || target_account.moved? || (!target_account.local? && target_account.ostatus?) + raise Mastodon::NotPermittedError if target_account.blocking?(source_account) || source_account.blocking?(target_account) || target_account.moved? target_account.mark_known! unless !Setting.auto_mark_known || target_account.known? @@ -52,7 +52,7 @@ class FollowService < BaseService if target_account.local? LocalNotificationWorker.perform_async(target_account.id, follow_request.id, follow_request.class.name) - elsif target_account.activitypub? + else ActivityPub::DeliveryWorker.perform_async(build_json(follow_request), source_account.id, target_account.inbox_url) end diff --git a/app/services/reject_follow_service.rb b/app/services/reject_follow_service.rb index bc0000c8c..afdb165e0 100644 --- a/app/services/reject_follow_service.rb +++ b/app/services/reject_follow_service.rb @@ -6,7 +6,7 @@ class RejectFollowService < BaseService def call(source_account, target_account) follow_request = FollowRequest.find_by!(account: source_account, target_account: target_account) follow_request.reject! - create_notification(follow_request) if !source_account.local? && source_account.activitypub? + create_notification(follow_request) if !source_account.local? follow_request end diff --git a/app/services/resolve_account_service.rb b/app/services/resolve_account_service.rb index 7c03bfc3e..c0356a4b3 100644 --- a/app/services/resolve_account_service.rb +++ b/app/services/resolve_account_service.rb @@ -93,7 +93,7 @@ class ResolveAccountService < BaseService if lock.acquired? @account = Account.find_remote(@username, @domain) - next if (@account.present? && !@account.activitypub?) || actor_json.nil? + next if @account.present? || actor_json.nil? @account = ActivityPub::ProcessAccountService.new.call(@username, @domain, actor_json) else diff --git a/app/services/unblock_service.rb b/app/services/unblock_service.rb index c263ac8af..80eed426a 100644 --- a/app/services/unblock_service.rb +++ b/app/services/unblock_service.rb @@ -7,7 +7,7 @@ class UnblockService < BaseService return unless account.blocking?(target_account) unblock = account.unblock!(target_account) - create_notification(unblock) if !target_account.local? && target_account.activitypub? + create_notification(unblock) if !target_account.local? unblock end diff --git a/app/services/unfavourite_service.rb b/app/services/unfavourite_service.rb index 37917a64f..d0298db46 100644 --- a/app/services/unfavourite_service.rb +++ b/app/services/unfavourite_service.rb @@ -6,7 +6,7 @@ class UnfavouriteService < BaseService def call(account, status) favourite = Favourite.find_by!(account: account, status: status) favourite.destroy! - create_notification(favourite) if !status.account.local? && status.account.activitypub? + create_notification(favourite) if !status.account.local? favourite end diff --git a/app/services/unfollow_service.rb b/app/services/unfollow_service.rb index b7033d7eb..3f8daffa3 100644 --- a/app/services/unfollow_service.rb +++ b/app/services/unfollow_service.rb @@ -21,8 +21,8 @@ class UnfollowService < BaseService return unless follow follow.destroy! - create_notification(follow) if !@target_account.local? && @target_account.activitypub? - create_reject_notification(follow) if @target_account.local? && !@source_account.local? && @source_account.activitypub? + create_notification(follow) if !@target_account.local? + create_reject_notification(follow) if @target_account.local? && !@source_account.local? UnmergeWorker.perform_async(@target_account.id, @source_account.id) follow end |