]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact/Introduction.php
Remove deprecated, impossible code for discarding with FID
[friendica.git] / src / Model / Contact / Introduction.php
index 692ba7befecfdef31e0f75c91121c8bbc0722677..7524711371c1be85736a4c864b442a255122483d 100644 (file)
@@ -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'])) {