1
0
Fork 0

Remove deprecated, impossible code for discarding with FID

This commit is contained in:
Philipp Holzer 2021-10-21 21:34:49 +02:00
parent 44627a0b12
commit 3153e098b0
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432

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