From 3153e098b0e83910a550773f5661d4e8541b14b7 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 21 Oct 2021 21:34:49 +0200 Subject: [PATCH] Remove deprecated, impossible code for discarding with FID --- src/Model/Contact/Introduction.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/Model/Contact/Introduction.php b/src/Model/Contact/Introduction.php index 692ba7befe..7524711371 100644 --- a/src/Model/Contact/Introduction.php +++ b/src/Model/Contact/Introduction.php @@ -111,23 +111,6 @@ class Introduction */ public static function discard(Entity\Introduction $introduction): void { - // If it is a friend suggestion, the contact is not a new friend but an existing friend - // that should not be deleted. - if (!$introduction->fid) { - // When the contact entry had been created just for that intro, we want to get rid of it now - $condition = [ - 'id' => $introduction->cid, - 'uid' => $introduction->uid, - 'self' => false, - 'pending' => true, - 'rel' => [0, Contact::FOLLOWER]]; - if (DI::dba()->exists('contact', $condition)) { - Contact::remove($introduction->cid); - } else { - Contact::update(['pending' => false], ['id' => $introduction->cid]); - } - } - $contact = Contact::selectFirst([], ['id' => $introduction->cid, 'uid' => $introduction->uid]); if (!empty($contact)) { if (!empty($contact['protocol'])) {