Skip to content

Commit 74fc85e

Browse files
authored
Fix ActivityPub votes having nil IDs (mastodon#10151)
1 parent 54aca0a commit 74fc85e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/serializers/activitypub/vote_serializer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class NoteSerializer < ActiveModel::Serializer
66
:in_reply_to, :to
77

88
def id
9-
nil
9+
[ActivityPub::TagManager.instance.uri_for(object.account), '#votes/', object.id].join
1010
end
1111

1212
def type
@@ -35,7 +35,7 @@ def to
3535
has_one :object, serializer: ActivityPub::VoteSerializer::NoteSerializer
3636

3737
def id
38-
nil
38+
[ActivityPub::TagManager.instance.uri_for(object.account), '#votes/', object.id, '/activity'].join
3939
end
4040

4141
def type

0 commit comments

Comments
 (0)