From da93373e8d959e112639c0c5c3ccbc715aac0dd1 Mon Sep 17 00:00:00 2001 From: Matthias Moritz Date: Wed, 30 Nov 2022 12:15:58 +0100 Subject: [PATCH 1/2] Fix #12262 - shared friendica posts are filtered on status page Native shares from the same Instance (or maybe all Friendica instances) were filtered out from the users home. With this commit they now appear on the users Profile/Status --- src/Module/Profile/Status.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Profile/Status.php b/src/Module/Profile/Status.php index 951a0e327..5dae349d7 100644 --- a/src/Module/Profile/Status.php +++ b/src/Module/Profile/Status.php @@ -174,8 +174,8 @@ class Status extends BaseProfile $condition = DBA::mergeConditions($condition, ["((`gravity` = ? AND `wall`) OR (`gravity` = ? AND `vid` = ? AND `origin` - AND `thr-parent-id` IN (SELECT `uri-id` FROM `post` WHERE `gravity` = ? AND `network` = ?)))", - Item::GRAVITY_PARENT, Item::GRAVITY_ACTIVITY, Verb::getID(Activity::ANNOUNCE), Item::GRAVITY_PARENT, Protocol::ACTIVITYPUB]); + AND `thr-parent-id` IN (SELECT `uri-id` FROM `post` WHERE `gravity` = ? )))", + Item::GRAVITY_PARENT, Item::GRAVITY_ACTIVITY, Verb::getID(Activity::ANNOUNCE), Item::GRAVITY_PARENT]); $condition = DBA::mergeConditions($condition, ['uid' => $profile['uid'], 'network' => Protocol::FEDERATED, 'visible' => true, 'deleted' => false]); From 71f4dd0d205533930f9d3d1bc115d7216285d508 Mon Sep 17 00:00:00 2001 From: Matthias Moritz Date: Wed, 30 Nov 2022 13:19:31 +0100 Subject: [PATCH 2/2] Update Status.php Instead of removing AP, added Protocol::DFRN to the list of networks. --- src/Module/Profile/Status.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Profile/Status.php b/src/Module/Profile/Status.php index 5dae349d7..6543ea195 100644 --- a/src/Module/Profile/Status.php +++ b/src/Module/Profile/Status.php @@ -174,8 +174,8 @@ class Status extends BaseProfile $condition = DBA::mergeConditions($condition, ["((`gravity` = ? AND `wall`) OR (`gravity` = ? AND `vid` = ? AND `origin` - AND `thr-parent-id` IN (SELECT `uri-id` FROM `post` WHERE `gravity` = ? )))", - Item::GRAVITY_PARENT, Item::GRAVITY_ACTIVITY, Verb::getID(Activity::ANNOUNCE), Item::GRAVITY_PARENT]); + AND `thr-parent-id` IN (SELECT `uri-id` FROM `post` WHERE `gravity` = ? AND `network` IN (?, ?))))", + Item::GRAVITY_PARENT, Item::GRAVITY_ACTIVITY, Verb::getID(Activity::ANNOUNCE), Item::GRAVITY_PARENT, Protocol::ACTIVITYPUB, Protocol::DFRN]); $condition = DBA::mergeConditions($condition, ['uid' => $profile['uid'], 'network' => Protocol::FEDERATED, 'visible' => true, 'deleted' => false]);