]> cat aescling's git repositories - mastodon.git/blob - app/serializers/activitypub/move_serializer.rb
Add account migration UI (#11846)
[mastodon.git] / app / serializers / activitypub / move_serializer.rb
1 # frozen_string_literal: true
2
3 class ActivityPub::MoveSerializer < ActivityPub::Serializer
4 attributes :id, :type, :target, :actor
5 attribute :virtual_object, key: :object
6
7 def id
8 [ActivityPub::TagManager.instance.uri_for(object.account), '#moves/', object.id].join
9 end
10
11 def type
12 'Move'
13 end
14
15 def target
16 ActivityPub::TagManager.instance.uri_for(object.target_account)
17 end
18
19 def virtual_object
20 ActivityPub::TagManager.instance.uri_for(object.account)
21 end
22
23 def actor
24 ActivityPub::TagManager.instance.uri_for(object.account)
25 end
26 end
This page took 0.068684 seconds and 5 git commands to generate.