1
0
Fork 0

Restore the behaviour to remove the remote contact upon termination

This commit is contained in:
Michael 2018-09-05 05:02:06 +00:00
commit 9ef1d827f3
7 changed files with 25 additions and 16 deletions

View file

@ -368,7 +368,7 @@ function _contact_drop($orig_record)
return;
}
Contact::terminateFriendship($r[0], $orig_record);
Contact::terminateFriendship($r[0], $orig_record, true);
Contact::remove($orig_record['id']);
}

View file

@ -322,8 +322,8 @@ function dfrn_notify_content(App $a) {
$encrypted_id = '';
$id_str = $my_id . '.' . mt_rand(1000,9999);
$prv_key = trim($importer['prvkey']);
$pub_key = trim($importer['pubkey']);
$prv_key = trim($importer['cprvkey']);
$pub_key = trim($importer['cpubkey']);
$dplx = intval($importer['duplex']);
if (($dplx && strlen($prv_key)) || (strlen($prv_key) && !strlen($pub_key))) {

View file

@ -44,7 +44,7 @@ function dirfind_content(App $a, $prefix = "") {
$local = Config::get('system','poco_local_search');
$search = $prefix.notags(trim($_REQUEST['search']));
$search = $prefix.notags(trim(defaults($_REQUEST, 'search', '')));
$header = '';

View file

@ -46,13 +46,15 @@ function unfollow_post()
// NOTREACHED
}
$dissolve = ($contact['rel'] == Contact::SHARING);
$owner = User::getOwnerDataById($uid);
if ($owner) {
Contact::terminateFriendship($owner, $contact);
Contact::terminateFriendship($owner, $contact, $dissolve);
}
// Sharing-only contacts get deleted as there no relationship any more
if ($contact['rel'] == Contact::SHARING) {
if ($dissolve) {
Contact::remove($contact['id']);
$return_path = 'contacts';
} else {