1
0
Fork 0

Don't show deleted contacts, changed "pending" behaviour

This commit is contained in:
Michael 2019-01-12 13:28:14 +00:00
commit 28f14c7d60
6 changed files with 23 additions and 16 deletions

View file

@ -137,7 +137,7 @@ class Widget
$extra_sql = self::unavailableNetworks();
$r = DBA::p("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = ? AND `network` != '' $extra_sql ORDER BY `network`",
$r = DBA::p("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = ? AND NOT `deleted` AND `network` != '' $extra_sql ORDER BY `network`",
local_user()
);

View file

@ -358,6 +358,7 @@ class Contact extends BaseObject
WHERE `gid` = ?
AND `contact`.`uid` = ?
AND NOT `contact`.`self`
AND NOT `contact`.`deleted`
AND NOT `contact`.`blocked`
AND NOT `contact`.`pending`
ORDER BY `contact`.`name` ASC',
@ -1030,6 +1031,7 @@ class Contact extends BaseObject
FROM `contact`
WHERE `uid` = %d
AND NOT `self`
AND NOT `deleted`
AND NOT `blocked`
AND NOT `pending`
AND `id` NOT IN (

View file

@ -50,7 +50,7 @@ class Transmitter
public static function getFollowers($owner, $page = null)
{
$condition = ['rel' => [Contact::FOLLOWER, Contact::FRIEND], 'network' => Protocol::NATIVE_SUPPORT, 'uid' => $owner['uid'],
'self' => false, 'hidden' => false, 'archive' => false, 'pending' => false];
'self' => false, 'deleted' => false, 'hidden' => false, 'archive' => false, 'pending' => false];
$count = DBA::count('contact', $condition);
$data = ['@context' => ActivityPub::CONTEXT];
@ -97,7 +97,7 @@ class Transmitter
public static function getFollowing($owner, $page = null)
{
$condition = ['rel' => [Contact::SHARING, Contact::FRIEND], 'network' => Protocol::NATIVE_SUPPORT, 'uid' => $owner['uid'],
'self' => false, 'hidden' => false, 'archive' => false, 'pending' => false];
'self' => false, 'deleted' => false, 'hidden' => false, 'archive' => false, 'pending' => false];
$count = DBA::count('contact', $condition);
$data = ['@context' => ActivityPub::CONTEXT];