diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-26 12:15:38 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-26 12:15:38 +0200 |
commit | dc212de9606422be6e912a0bb7f3569192942938 (patch) | |
tree | 5a253e3b57d14751214513a029d84699f5ad5b21 /include/diaspora.php | |
parent | bed0043b30c219a08aa0b352923299ea153d515c (diff) | |
parent | 6d6136cdb5a2149037c3cf315b3fa81a72bd7d55 (diff) | |
download | volse-hubzilla-dc212de9606422be6e912a0bb7f3569192942938.tar.gz volse-hubzilla-dc212de9606422be6e912a0bb7f3569192942938.tar.bz2 volse-hubzilla-dc212de9606422be6e912a0bb7f3569192942938.zip |
Merge remote-tracking branch 'friendika/master'
Diffstat (limited to 'include/diaspora.php')
-rw-r--r-- | include/diaspora.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index 2379ae8e3..ad5e2adb2 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -92,12 +92,14 @@ function find_diaspora_person_by_handle($handle) { dbesc($handle) ); if(count($r)) { + logger('find_diaspora_person_by handle: in cache ' . print_r($r,true), LOGGER_DEBUG); // update record occasionally so it doesn't get stale $d = strtotime($r[0]['updated'] . ' +00:00'); if($d > strtotime('now - 14 days')) return $r[0]; $update = true; } + logger('find_diaspora_person_by_handle: refresh',LOGGER_DEBUG); require_once('include/Scrape.php'); $r = probe_url($handle, PROBE_DIASPORA); if((count($r)) && ($r['network'] === NETWORK_DIASPORA)) { @@ -947,7 +949,10 @@ function diaspora_comment($importer,$xml,$msg) { $datarray['author-avatar'] = ((x($person,'thumb')) ? $person['thumb'] : $person['photo']); $datarray['body'] = $body; $datarray['tag'] = $str_tags; - $datarray['app'] = 'Diaspora'; + + // We can't be certain what the original app is if the message is relayed. + if(($parent_item['origin']) && (! $parent_author_signature)) + $datarray['app'] = 'Diaspora'; $message_id = item_store($datarray); |