Skip to content

Commit bb96a74

Browse files
committed
Revert "Add handler for Move activity (mastodon#9629)"
This reverts commit 0f938ff.
1 parent 1b35ca1 commit bb96a74

12 files changed

Lines changed: 3 additions & 136 deletions

File tree

app/lib/activitypub/activity.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ def klass
5050
ActivityPub::Activity::Add
5151
when 'Remove'
5252
ActivityPub::Activity::Remove
53-
when 'Move'
54-
ActivityPub::Activity::Move
5553
end
5654
end
5755
end

app/lib/activitypub/activity/follow.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def perform
66

77
return if target_account.nil? || !target_account.local? || delete_arrived_first?(@json['id']) || @account.requested?(target_account)
88

9-
if target_account.blocking?(@account) || target_account.domain_blocking?(@account.domain) || target_account.moved?
9+
if target_account.blocking?(@account) || target_account.domain_blocking?(@account.domain)
1010
reject_follow_request!(target_account)
1111
return
1212
end

app/lib/activitypub/activity/move.rb

Lines changed: 0 additions & 43 deletions
This file was deleted.

app/lib/activitypub/adapter.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
1010
'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
1111
'sensitive' => 'as:sensitive',
1212
'movedTo' => { '@id' => 'as:movedTo', '@type' => '@id' },
13-
'alsoKnownAs' => { '@id' => 'as:alsoKnownAs', '@type' => '@id' },
1413
'Hashtag' => 'as:Hashtag',
1514
'ostatus' => 'http://ostatus.org#',
1615
'atomUri' => 'ostatus:atomUri',

app/models/account.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
# fields :jsonb
4545
# actor_type :string
4646
# discoverable :boolean
47-
# also_known_as :string is an Array
4847
#
4948

5049
class Account < ApplicationRecord
@@ -233,10 +232,6 @@ def tags_as_strings=(tag_names)
233232
end
234233
end
235234

236-
def also_known_as
237-
self[:also_known_as] || []
238-
end
239-
240235
def fields
241236
(self[:fields] || []).map { |f| Field.new(self, f) }
242237
end

app/serializers/activitypub/actor_serializer.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
1414
has_many :virtual_attachments, key: :attachment
1515

1616
attribute :moved_to, if: :moved?
17-
attribute :also_known_as, if: :also_known_as?
1817

1918
class EndpointsSerializer < ActiveModel::Serializer
2019
include RoutingHelper
@@ -117,10 +116,6 @@ def moved_to
117116
ActivityPub::TagManager.instance.uri_for(object.moved_to_account)
118117
end
119118

120-
def also_known_as?
121-
!object.also_known_as.empty?
122-
end
123-
124119
class CustomEmojiSerializer < ActivityPub::EmojiSerializer
125120
end
126121

app/services/activitypub/process_account_service.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def set_immediate_attributes!
7575
@account.note = @json['summary'] || ''
7676
@account.locked = @json['manuallyApprovesFollowers'] || false
7777
@account.fields = property_values || {}
78-
@account.also_known_as = as_array(@json['alsoKnownAs'] || []).map { |item| value_or_id(item) }
7978
@account.actor_type = actor_type
8079
end
8180

app/services/follow_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def call(source_account, target_account, reblogs: nil)
1010
target_account = ResolveAccountService.new.call(target_account, skip_webfinger: true)
1111

1212
raise ActiveRecord::RecordNotFound if target_account.nil? || target_account.id == source_account.id || target_account.suspended?
13-
raise Mastodon::NotPermittedError if target_account.blocking?(source_account) || source_account.blocking?(target_account) || target_account.moved?
13+
raise Mastodon::NotPermittedError if target_account.blocking?(source_account) || source_account.blocking?(target_account)
1414

1515
if source_account.following?(target_account)
1616
# We're already following this account, but we'll call follow! again to

app/workers/unfollow_follow_worker.rb

Lines changed: 0 additions & 18 deletions
This file was deleted.

db/migrate/20181226021420_add_also_known_as_to_accounts.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)