]> cat aescling's git repositories - mastodon.git/commitdiff
Don't PuSH-resubscribe if already subscribed
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 11 Feb 2017 12:48:28 +0000 (13:48 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 11 Feb 2017 12:48:28 +0000 (13:48 +0100)
app/services/follow_service.rb

index 45b7895b607717784c7f101c1b29f45c24597fc0..6ca834c19a8b4fda5306c589e72e4640e95e4cc7 100644 (file)
@@ -39,7 +39,7 @@ class FollowService < BaseService
     if target_account.local?
       NotifyService.new.call(target_account, follow)
     else
-      subscribe_service.call(target_account)
+      subscribe_service.call(target_account) unless target_account.subscribed?
       NotificationWorker.perform_async(stream_entry_to_xml(follow.stream_entry), source_account.id, target_account.id)
     end