From: Hank Grabowski Date: Mon, 29 May 2023 18:03:16 +0000 (-0400) Subject: Change selectOriginal post to return earliest post from non-0 user X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=532a46d1886f431efb159818d5afa709b501f261;p=friendica.git Change selectOriginal post to return earliest post from non-0 user I believe the earliest entry not being uid=0 should be the original post of a reshared post --- diff --git a/src/Model/Post.php b/src/Model/Post.php index 770ab08317..9e137ae379 100644 --- a/src/Model/Post.php +++ b/src/Model/Post.php @@ -263,7 +263,10 @@ class Post return $result; } - return self::selectFirst($original_fields, ['uri-id' => $result['thr-parent-id'], 'uid' => [0, $result['uid']]], $params); + $final_query_condition = ['uri-id' => $result['thr-parent-id']]; + $final_query_condition = DBA::mergeConditions($final_query_condition, ['uid != 0']); + $final_params = ['order' => ['id']]; + return self::selectFirst($original_fields, $final_query_condition, $final_params); } /**