]> git.mxchange.org Git - friendica.git/commitdiff
Hopefully this fixes the workflow
authorMichael <heluecht@pirati.ca>
Tue, 2 May 2017 21:06:56 +0000 (21:06 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 2 May 2017 21:06:56 +0000 (21:06 +0000)
include/diaspora.php

index c250e2252b7f9c5ee2c80f4b082346bc7463ef01..520aa8caa4ed9c58c20b8d6b32e33b264f588586 100644 (file)
@@ -856,7 +856,12 @@ class Diaspora {
                $contact = self::contact_by_handle($importer["uid"], $handle);
                if (!$contact) {
                        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)) {
@@ -1111,9 +1116,9 @@ class Diaspora {
                        $cid = $r[0]["id"];
                        $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.
-                       unmark_for_death($contact);
+                       unmark_for_death($r[0]);
                } else {
                        $cid = $contact["id"];
                        $network = NETWORK_DIASPORA;
@@ -1240,7 +1245,7 @@ class Diaspora {
 
                if (dbm::is_result($item)) {
                        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)) {
                                $importer = $contact;
                        }