diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-23 09:38:27 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:20 -0500 |
commit | 5622de4a785e6b7c9a4946af3efaf8b4c2bc5755 (patch) | |
tree | b9378500aa449af54ac09c44b2aba8f6ee2a184b /app/presenters | |
parent | 5de7e2d667fa55f353a8b3d988cd047c118a4250 (diff) |
[Feature] Support Misskey-compatible boosts with attached content notes
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/activitypub/activity_presenter.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/presenters/activitypub/activity_presenter.rb b/app/presenters/activitypub/activity_presenter.rb index 4d5d28611..7a19cc96a 100644 --- a/app/presenters/activitypub/activity_presenter.rb +++ b/app/presenters/activitypub/activity_presenter.rb @@ -8,7 +8,7 @@ class ActivityPub::ActivityPresenter < ActiveModelSerializers::Model new.tap do |presenter| default_activity = update && status.edited.positive? ? 'Update' : 'Create' presenter.id = ActivityPub::TagManager.instance.activity_uri_for(status) - presenter.type = status.reblog? ? 'Announce' : default_activity + presenter.type = (status.reblog? && status.spoiler_text.blank? ? 'Announce' : default_activity) presenter.actor = ActivityPub::TagManager.instance.uri_for(status.account) presenter.published = status.created_at presenter.to = ActivityPub::TagManager.instance.to(status) @@ -20,14 +20,14 @@ class ActivityPub::ActivityPresenter < ActiveModelSerializers::Model end presenter.virtual_object = begin - if status.reblog? + if status.reblog? && status.spoiler_text.blank? if status.account == status.proper.account && status.proper.private_visibility? && status.local? status.proper else ActivityPub::TagManager.instance.uri_for(status.proper) end else - status.proper + status end end end |