Browse Source

Remove deprecated, impossible code for discarding with FID

pull/10893/head
Philipp 8 months ago
parent
commit
3153e098b0
No known key found for this signature in database
GPG Key ID: 24A7501396EB5432
  1. 17
      src/Model/Contact/Introduction.php

17
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'])) {

Loading…
Cancel
Save