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
This commit is contained in:
Hank Grabowski 2023-05-29 14:03:16 -04:00 committed by Hypolite Petovan
parent 8d9e0b4eae
commit 532a46d188

View file

@ -263,7 +263,10 @@ class Post
return $result; 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);
} }
/** /**