Issue 6867: Only display direct mentions in the corresponding API endpoint
This commit is contained in:
parent
1479c426c7
commit
533f07e874
|
@ -1,6 +1,6 @@
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
-- Friendica 2019.12-rc (Dalmatian Bellflower)
|
-- Friendica 2019.12-rc (Dalmatian Bellflower)
|
||||||
-- DB_UPDATE_VERSION 1325
|
-- DB_UPDATE_VERSION 1326
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@ -637,6 +637,7 @@ CREATE TABLE IF NOT EXISTS `item` (
|
||||||
INDEX `resource-id` (`resource-id`),
|
INDEX `resource-id` (`resource-id`),
|
||||||
INDEX `deleted_changed` (`deleted`,`changed`),
|
INDEX `deleted_changed` (`deleted`,`changed`),
|
||||||
INDEX `uid_wall_changed` (`uid`,`wall`,`changed`),
|
INDEX `uid_wall_changed` (`uid`,`wall`,`changed`),
|
||||||
|
INDEX `mention_uid_id` (`mention`,`uid`,`id`),
|
||||||
INDEX `uid_eventid` (`uid`,`event-id`),
|
INDEX `uid_eventid` (`uid`,`event-id`),
|
||||||
INDEX `icid` (`icid`),
|
INDEX `icid` (`icid`),
|
||||||
INDEX `iaid` (`iaid`),
|
INDEX `iaid` (`iaid`),
|
||||||
|
|
|
@ -2165,8 +2165,8 @@ function api_statuses_mentions($type)
|
||||||
|
|
||||||
$start = max(0, ($page - 1) * $count);
|
$start = max(0, ($page - 1) * $count);
|
||||||
|
|
||||||
$condition = ["`uid` = ? AND `gravity` IN (?, ?) AND `item`.`id` > ? AND `author-id` != ?
|
$condition = ["`uid` = ? AND `gravity` IN (?, ?) AND `item`.`id` > ? AND `author-id` != ? AND `mention`
|
||||||
AND `item`.`parent` IN (SELECT `iid` FROM `thread` WHERE `thread`.`uid` = ? AND `thread`.`mention` AND NOT `thread`.`ignored`)",
|
AND `item`.`parent` IN (SELECT `iid` FROM `thread` WHERE `thread`.`uid` = ? AND NOT `thread`.`ignored`)",
|
||||||
api_user(), GRAVITY_PARENT, GRAVITY_COMMENT, $since_id, $user_info['pid'], api_user()];
|
api_user(), GRAVITY_PARENT, GRAVITY_COMMENT, $since_id, $user_info['pid'], api_user()];
|
||||||
|
|
||||||
if ($max_id > 0) {
|
if ($max_id > 0) {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
if (!defined('DB_UPDATE_VERSION')) {
|
if (!defined('DB_UPDATE_VERSION')) {
|
||||||
define('DB_UPDATE_VERSION', 1325);
|
define('DB_UPDATE_VERSION', 1326);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -705,6 +705,7 @@ return [
|
||||||
"resource-id" => ["resource-id"],
|
"resource-id" => ["resource-id"],
|
||||||
"deleted_changed" => ["deleted", "changed"],
|
"deleted_changed" => ["deleted", "changed"],
|
||||||
"uid_wall_changed" => ["uid", "wall", "changed"],
|
"uid_wall_changed" => ["uid", "wall", "changed"],
|
||||||
|
"mention_uid_id" => ["mention", "uid", "id"],
|
||||||
"uid_eventid" => ["uid", "event-id"],
|
"uid_eventid" => ["uid", "event-id"],
|
||||||
"icid" => ["icid"],
|
"icid" => ["icid"],
|
||||||
"iaid" => ["iaid"],
|
"iaid" => ["iaid"],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user