diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-11 21:53:20 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-02-11 21:53:20 +0100 |
commit | 51cad4f7fba199cdcda3ba18b68a25312e21c256 (patch) | |
tree | 15e40a919e3c7984db95e2be5a21098b0a086886 /app/presenters/activitypub/activity_presenter.rb | |
parent | 776e337b8d2aa66440bc4565617b5440ca781e1a (diff) | |
parent | d0fcf07436d158bcac2617d076a83d0aa49c39e6 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/presenters/activitypub/activity_presenter.rb')
-rw-r--r-- | app/presenters/activitypub/activity_presenter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/presenters/activitypub/activity_presenter.rb b/app/presenters/activitypub/activity_presenter.rb index 5d174767f..38e8527e8 100644 --- a/app/presenters/activitypub/activity_presenter.rb +++ b/app/presenters/activitypub/activity_presenter.rb @@ -4,7 +4,7 @@ class ActivityPub::ActivityPresenter < ActiveModelSerializers::Model attributes :id, :type, :actor, :published, :to, :cc, :virtual_object class << self - def from_status(status) + def from_status(status, allow_inlining: true) new.tap do |presenter| presenter.id = ActivityPub::TagManager.instance.activity_uri_for(status) presenter.type = status.reblog? ? 'Announce' : 'Create' @@ -15,7 +15,7 @@ class ActivityPub::ActivityPresenter < ActiveModelSerializers::Model presenter.virtual_object = begin if status.reblog? - if status.account == status.proper.account && status.proper.private_visibility? && status.local? + if allow_inlining && status.account == status.proper.account && status.proper.private_visibility? && status.local? status.proper else ActivityPub::TagManager.instance.uri_for(status.proper) |