]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge remote-tracking branch 'upstream/develop' into archive-contact
[friendica.git] / include / items.php
index cbc7af56553f4ce20a8bd9715acefe1ebe9169bd..f0470feb7e0570f30249b064bd2c0eae9e118665 100644 (file)
@@ -1166,6 +1166,10 @@ function item_set_last_item($arr) {
        if ($update) {
                dba::update('contact', array('success_update' => $arr['received'], 'last-item' => $arr['received']),
                        array('id' => $arr['contact-id']));
+               $contact = dba::select('contact', [], ['id' => $arr['contact-id']], ['limit' => 1]);
+               if ($contact['term-date'] > NULL_DATE) {
+                        Contact::unmarkForArchival($contact);
+               }
        }
        // Now do the same for the system wide contacts with uid=0
        if (!$arr['private']) {