Browse Source

Ensure that "follow" requests can be processed

pull/5386/head
Michael 3 years ago
parent
commit
95fe08e5b9
  1. 14
      src/Protocol/DFRN.php

14
src/Protocol/DFRN.php

@ -2624,17 +2624,12 @@ class DFRN
$item["type"] = "remote-comment";
$item["wall"] = 1;
} elseif ($entrytype == DFRN::TOP_LEVEL) {
if ($owner_unknown) {
logger("Item won't be stored because user " . $importer["importer_uid"] . " doesn't follow " . $item["owner-link"] . ".", LOGGER_DEBUG);
return;
}
if (!isset($item["object-type"])) {
$item["object-type"] = ACTIVITY_OBJ_NOTE;
}
// Is it an event?
if ($item["object-type"] == ACTIVITY_OBJ_EVENT) {
if (($item["object-type"] == ACTIVITY_OBJ_EVENT) && !$owner_unknown) {
logger("Item ".$item["uri"]." seems to contain an event.", LOGGER_DEBUG);
$ev = Event::fromBBCode($item["body"]);
if ((x($ev, "desc") || x($ev, "summary")) && x($ev, "start")) {
@ -2667,6 +2662,13 @@ class DFRN
return;
}
// This check is done here to be able to receive connection requests in "processVerbs"
if (($entrytype == DFRN::TOP_LEVEL) && $owner_unknown) {
logger("Item won't be stored because user " . $importer["importer_uid"] . " doesn't follow " . $item["owner-link"] . ".", LOGGER_DEBUG);
return;
}
// Update content if 'updated' changes
if (DBM::is_result($current)) {
if (self::updateContent($current, $item, $importer, $entrytype)) {

Loading…
Cancel
Save