X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FOnePoll.php;h=e42612cd31ffa10604fc7462aaaeb1b154170974;hb=b1cb955110bd2649a507a0b5a72d399ea1d6c47c;hp=42b0d9f8c4f38d876ae4bcb30d4ba32f0519e007;hpb=8a3927e12c37eb1f7aba51291dc45c45effd2a2a;p=friendica.git diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index 42b0d9f8c4..e42612cd31 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -78,7 +78,7 @@ class OnePoll $last_updated = $contact['last-item']; } - $fields = ['last-item' => $last_updated, 'last-update' => $updated, 'success_update' => $updated]; + $fields = ['last-item' => DateTimeFormat::utc($last_updated), 'last-update' => $updated, 'success_update' => $updated]; self::updateContact($contact, $fields); Contact::unmarkForArchival($contact); } else { @@ -309,7 +309,7 @@ class OnePoll // Are we allowed to import from this person? - if ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly']) { + if ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked']) { // set the last-update so we don't keep polling dba::update('contact', ['last-update' => DateTimeFormat::utcNow()], ['id' => $contact['id']]); return; @@ -582,14 +582,15 @@ class OnePoll logger("Consume feed of contact ".$contact['id']); - consume_feed($xml, $importer, $contact, $hub, 1, 1); + consume_feed($xml, $importer, $contact, $hub); - // do it twice. Ensures that children of parents which may be later in the stream aren't tossed - - consume_feed($xml, $importer, $contact, $hub, 1, 2); + // do it a second time for DFRN so that any children find their parents. + if ($contact['network'] === NETWORK_DFRN) { + consume_feed($xml, $importer, $contact, $hub); + } $hubmode = 'subscribe'; - if ($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) { + if ($contact['network'] === NETWORK_DFRN || $contact['blocked']) { $hubmode = 'unsubscribe'; }