From 4db3c79d04e3b26639834c206e54c23e2da03905 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 27 Jun 2019 05:03:58 +0000 Subject: [PATCH] Archive/unarchive the contacts --- src/Model/Contact.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 70a152d431..fea0119787 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1770,6 +1770,15 @@ class Contact extends BaseObject return; } + // Archive or unarchive the contact. We only need to do this for the public contact. + // The archive/unarchive function will update the personal contacts by themselves. + $contact = DBA::selectFirst('contact', [], ['id' => $id]); + if (!empty($fields['success_update'])) { + self::unmarkForArchival($contact); + } elseif (!empty($fields['failure_update'])) { + self::markForArchival($contact); + } + $condition = ['self' => false, 'nurl' => Strings::normaliseLink($url), 'network' => [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS]];