Merge pull request #5722 from annando/dissolve

Restore the behaviour to remove the remote contact upon termination
This commit is contained in:
Tobias Diekershoff 2018-09-05 08:23:41 +02:00 committed by GitHub
commit 31cbc80981
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 16 deletions

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 {