Commit fd59a5b4 authored by Ben Hayward's avatar Ben Hayward

Added subtype check before setting hidden #593

1 merge request!260[InterestingIguana](bug) Fixed blog edits not saving #593
Pipeline #70304038 pending with stages
......@@ -52,7 +52,12 @@ class AttachmentPaywallDelegate implements ActivityDelegateInterface
if ($attachment->owner_guid == $activity->owner_guid) {
$attachment->access_id = $activity->isPaywall() ? 0 : 2;
$attachment->setHidden($activity->isPaywall());
if ($attachment->getSubtype() === 'blog') {
$attachment->setHidden($activity->isPaywall());
} else {
$attachment->hidden = $activity->isPaywall();
}
if (method_exists($attachment, 'setFlag')) {
$attachment->setFlag('paywall', (bool) $activity->isPaywall());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment