]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge pull request #2251 from annando/1601-plaintext
[friendica.git] / include / items.php
index c9e13b1a1f3f084cfff8803032b848254103c743..549027671d5e11c827c81ca43454a23acd0ee95f 100644 (file)
@@ -1338,6 +1338,10 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                logger("item_store: Set network to ".$arr["network"]." for ".$arr["uri"], LOGGER_DEBUG);
        }
 
+       if ($arr["gcontact-id"] == 0)
+               $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['author-link'], "network" => $arr['network'],
+                                                        "photo" => $arr['author-avatar'], "name" => $arr['author-name']));
+
        if ($arr['guid'] != "") {
                // Checking if there is already an item with the same guid
                logger('checking for an item for user '.$arr['uid'].' on network '.$arr['network'].' with the guid '.$arr['guid'], LOGGER_DEBUG);