From 72d74b88be0e9a25920d336c7eab0aeb09342f63 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 25 Oct 2011 19:59:57 -0700 Subject: some dspr fixes --- include/diaspora.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/diaspora.php') 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); -- cgit v1.2.3