From: Hank Grabowski Date: Thu, 23 Feb 2023 12:04:12 +0000 (-0500) Subject: Add support for since_id field into the timeline API X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9a6ebc94c48d1b42cb5db9a8349bfefc34d34c3f;p=friendica.git Add support for since_id field into the timeline API --- diff --git a/src/Module/BaseApi.php b/src/Module/BaseApi.php index 5f1156d771..895cff2b82 100644 --- a/src/Module/BaseApi.php +++ b/src/Module/BaseApi.php @@ -139,11 +139,12 @@ class BaseApi extends BaseModule $condition = DBA::mergeConditions($condition, ["`$order_field` < ?", DateTimeFormat::convert($request['max_id'], DateTimeFormat::MYSQL)]); } + if (!empty($request['since_id'])) { + $condition = DBA::mergeConditions($condition, ["`$order_field` > ?", DateTimeFormat::convert($request['since_id'], DateTimeFormat::MYSQL)]); + } if (!empty($request['min_id'])) { $condition = DBA::mergeConditions($condition, ["`$order_field` > ?", DateTimeFormat::convert($request['min_id'], DateTimeFormat::MYSQL)]); - - $params['order'] = [$order_field]; } }