about summary refs log tree commit diff
path: root/app/services/activitypub
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-06 20:51:20 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:23 -0500
commit6c374b51537126a2cba29f3eaf74faf1fc64ba96 (patch)
tree776239f0aaf7a0abed2d09440eccbb1d6d53a7a2 /app/services/activitypub
parent6e8ec7f0a538b5383da49c4435835b78c61da0bc (diff)
Drop OStatus support. Fix some of the Rspec tests.
Diffstat (limited to 'app/services/activitypub')
-rw-r--r--app/services/activitypub/process_account_service.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb
index ad22d37fe..f36ab7d61 100644
--- a/app/services/activitypub/process_account_service.rb
+++ b/app/services/activitypub/process_account_service.rb
@@ -19,7 +19,6 @@ class ActivityPub::ProcessAccountService < BaseService
       if lock.acquired?
         @account        = Account.find_remote(@username, @domain)
         @old_public_key = @account&.public_key
-        @old_protocol   = @account&.protocol
 
         create_account if @account.nil?
         update_account
@@ -32,7 +31,6 @@ class ActivityPub::ProcessAccountService < BaseService
 
     return if @account.nil?
 
-    after_protocol_change! if protocol_changed?
     after_key_change! if key_changed? && !@options[:signed_with_known_key]
     clear_tombstones! if key_changed?
 
@@ -50,7 +48,6 @@ class ActivityPub::ProcessAccountService < BaseService
 
   def create_account
     @account = Account.new
-    @account.protocol     = :activitypub
     @account.username     = @username
     @account.domain       = @domain
     @account.private_key  = nil
@@ -60,7 +57,6 @@ class ActivityPub::ProcessAccountService < BaseService
 
   def update_account
     @account.last_webfingered_at = Time.now.utc unless @options[:only_key]
-    @account.protocol            = :activitypub
 
     set_immediate_attributes!
     set_fetchable_attributes! unless @options[:only_keys]
@@ -94,10 +90,6 @@ class ActivityPub::ProcessAccountService < BaseService
     @account.moved_to_account  = @json['movedTo'].present? ? moved_account : nil
   end
 
-  def after_protocol_change!
-    ActivityPub::PostUpgradeWorker.perform_async(@account.domain)
-  end
-
   def after_key_change!
     RefollowWorker.perform_async(@account.id)
   end
@@ -216,10 +208,6 @@ class ActivityPub::ProcessAccountService < BaseService
     Tombstone.where(account_id: @account.id).delete_all
   end
 
-  def protocol_changed?
-    !@old_protocol.nil? && @old_protocol != @account.protocol
-  end
-
   def lock_options
     { redis: Redis.current, key: "process_account:#{@uri}" }
   end