mirror of
https://github.com/friendica/friendica
synced 2025-04-27 13:10:10 +00:00
API: several fixes to the Twitter/Statusnet API
This commit is contained in:
parent
093dd70e79
commit
bf5c8a2c43
22 changed files with 94 additions and 70 deletions
|
@ -52,7 +52,7 @@ class Mentions extends BaseApi
|
|||
|
||||
$query = "`gravity` IN (?, ?) AND `uri-id` IN
|
||||
(SELECT `uri-id` FROM `post-user-notification` WHERE `uid` = ? AND `notification-type` & ? != 0 ORDER BY `uri-id`)
|
||||
AND (`uid` = 0 OR (`uid` = ? AND NOT `global`)) AND `id` > ?";
|
||||
AND (`uid` = 0 OR (`uid` = ? AND NOT `global`)) AND `uri-id` > ?";
|
||||
|
||||
$condition = [
|
||||
GRAVITY_PARENT, GRAVITY_COMMENT,
|
||||
|
@ -64,13 +64,13 @@ class Mentions extends BaseApi
|
|||
];
|
||||
|
||||
if ($max_id > 0) {
|
||||
$query .= " AND `id` <= ?";
|
||||
$query .= " AND `uri-id` <= ?";
|
||||
$condition[] = $max_id;
|
||||
}
|
||||
|
||||
array_unshift($condition, $query);
|
||||
|
||||
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
||||
$params = ['order' => ['uri-id' => true], 'limit' => [$start, $count]];
|
||||
$statuses = Post::selectForUser($uid, [], $condition, $params);
|
||||
|
||||
$ret = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue