]> git.mxchange.org Git - friendica.git/commitdiff
Better check for Diaspora accounts so you can connect them from the /suggest page.
authorMichael Vogel <icarus@dabo.de>
Tue, 6 Jan 2015 11:31:44 +0000 (12:31 +0100)
committerMichael Vogel <icarus@dabo.de>
Tue, 6 Jan 2015 11:31:44 +0000 (12:31 +0100)
include/Scrape.php
include/items.php
include/threads.php

index 99784af336120cf08e0a76ac306947712309de3e..629f7a063bf3ba409177495caa21a4cbcca3e582 100644 (file)
@@ -750,5 +750,14 @@ function probe_url($url, $mode = PROBE_NORMAL) {
 
        logger('probe_url: ' . print_r($result,true), LOGGER_DEBUG);
 
+       // Trying if it maybe a diaspora account
+       if ($result['network'] == NETWORK_FEED) {
+               require_once('include/bbcode.php');
+               $address = GetProfileUsername($url, "", true);
+               $result2 = probe_url($address, $mode);
+               if ($result2['network'] != "")
+                       $result = $result2;
+       }
+
        return $result;
 }
index a7e996015e7fd6f9b48e45c71726ed57b84acf61..c1352cebbea41260dfbac3897be4f453e3e2f12f 100644 (file)
@@ -1348,7 +1348,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                // Contacts from the statusnet connector are also added since you could add them in OStatus as well.
                if (!$arr['private'] AND in_array($arr["network"],
                        array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, NETWORK_STATUSNET, "")))
-                       poco_check($arr["author-link"], $arr["author-name"], $arr["author-avatar"], "", $arr["received"]);
+                       poco_check($arr["author-link"], $arr["author-name"], $arr["author-avatar"], "", $arr["received"], $arr['contact-id'], $arr['uid']);
 
                // Set "success_update" to the date of the last time we heard from this contact
                // This can be used to filter for inactive contacts and poco.
index 28bf87f4dae97a7a1ee650a7d022145ff235b876..8febe49e9bee6958463684c585a3c355f7bbe411 100644 (file)
@@ -153,6 +153,8 @@ function delete_thread_uri($itemuri, $uid) {
 }
 
 function delete_thread($itemid) {
+       // To-Do:
+       // There is no "uri" in the thread table ...
        $item = q("SELECT `uri`, `uid` FROM `thread` WHERE `iid` = %d", intval($itemid));
 
        $result = q("DELETE FROM `thread` WHERE `iid` = %d", intval($itemid));