Hopefully this fixes the workflow

This commit is contained in:
Michael 2017-05-02 21:06:56 +00:00
parent 99a54df8d8
commit 83e50385a8

View file

@ -856,7 +856,12 @@ class Diaspora {
$contact = self::contact_by_handle($importer["uid"], $handle); $contact = self::contact_by_handle($importer["uid"], $handle);
if (!$contact) { if (!$contact) {
logger("A Contact for handle ".$handle." and user ".$importer["uid"]." was not found"); logger("A Contact for handle ".$handle." and user ".$importer["uid"]." was not found");
return false; // If a contact isn't found, we accept it anyway if it is a comment
if ($is_comment) {
return $importer;
} else {
return true;
}
} }
if (!self::post_allow($importer, $contact, $is_comment)) { if (!self::post_allow($importer, $contact, $is_comment)) {
@ -1111,9 +1116,9 @@ class Diaspora {
$cid = $r[0]["id"]; $cid = $r[0]["id"];
$network = $r[0]["network"]; $network = $r[0]["network"];
// We are receiving content from a user that is about to be terminated // We are receiving content from a user that possibly is about to be terminated
// This means the user is vital, so we remove a possible termination date. // This means the user is vital, so we remove a possible termination date.
unmark_for_death($contact); unmark_for_death($r[0]);
} else { } else {
$cid = $contact["id"]; $cid = $contact["id"];
$network = NETWORK_DIASPORA; $network = NETWORK_DIASPORA;
@ -1240,7 +1245,7 @@ class Diaspora {
if (dbm::is_result($item)) { if (dbm::is_result($item)) {
logger("Found user ".$item['uid']." as owner of item ".$guid, LOGGER_DEBUG); logger("Found user ".$item['uid']." as owner of item ".$guid, LOGGER_DEBUG);
$contact = dba::fetch_first("SELECT `uid`, `page-flags` FROM `contact` WHERE `self` AND `uid` = ?", $item['uid']); $contact = dba::fetch_first("SELECT * FROM `contact` WHERE `self` AND `uid` = ?", $item['uid']);
if (dbm::is_result($contact)) { if (dbm::is_result($contact)) {
$importer = $contact; $importer = $contact;
} }