From 4eead1c688f57bdf04091675fa38c5eed9f6acde Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 26 Jan 2018 13:42:53 -0800 Subject: typo from previous checkin and partial fix to hubzilla #965 - show any connection without comment permission as archived in contact_block(). --- include/account.php | 2 +- include/text.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/account.php b/include/account.php index 3a7b677be..3ac485974 100644 --- a/include/account.php +++ b/include/account.php @@ -266,7 +266,7 @@ function verify_email_address($arr) { $email = $arr['email']; $a = q("select * from account where account_email = '%s' limit 1", dbesc($arr['email']) - } + ); if(! ($a && ($a[0]['account_flags'] & ACCOUNT_UNVERIFIED))) { return false; } diff --git a/include/text.php b/include/text.php index 956f42f7d..8ec6ebace 100644 --- a/include/text.php +++ b/include/text.php @@ -973,7 +973,14 @@ function contact_block() { $contacts = t('Connections'); $micropro = Array(); foreach($r as $rr) { - $rr['archived'] = (intval($rr['abook_archived']) ? true : false); + + // There is no setting to discover if you are bi-directionally connected + // Use the ability to post comments as an indication that this relationship is more + // than wishful thinking; even though soapbox channels and feeds will disable it. + + if(! intval(get_abconfig(App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) { + $rr['archived'] = true; + } $micropro[] = micropro($rr,true,'mpfriend'); } } -- cgit v1.2.3