aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Prezkuta <fermion@gmx.com>2012-06-10 08:41:23 -0600
committerZach Prezkuta <fermion@gmx.com>2012-06-16 10:25:33 -0600
commit0946c4a375838072d8c54b348191004e1002416e (patch)
treeb31b49b183bbb1f544259aa9f03b5921439af52a
parent09eb52810bbae39ba84b869d753ea2a062423b3a (diff)
downloadvolse-hubzilla-0946c4a375838072d8c54b348191004e1002416e.tar.gz
volse-hubzilla-0946c4a375838072d8c54b348191004e1002416e.tar.bz2
volse-hubzilla-0946c4a375838072d8c54b348191004e1002416e.zip
still need the original author information for comments and likes
-rwxr-xr-xinclude/diaspora.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index e91ebf442..ecf1fd7a9 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1119,6 +1119,18 @@ function diaspora_comment($importer,$xml,$msg) {
// Phew! Everything checks out. Now create an item.
+ // Find the original comment author information
+ if(strcasecmp($diaspora_handle,$msg['author']) == 0)
+ $person = $contact;
+ else {
+ $person = find_diaspora_person_by_handle($diaspora_handle);
+
+ if(! is_array($person)) {
+ logger('diaspora_comment: unable to find author details');
+ return;
+ }
+ }
+
$body = diaspora2bb($text);
$message_id = $diaspora_handle . ':' . $guid;
@@ -1704,6 +1716,18 @@ function diaspora_like($importer,$xml,$msg) {
// Phew! Everything checks out. Now create an item.
+ // Find the original like author information
+ if(strcasecmp($diaspora_handle,$msg['author']) == 0)
+ $person = $contact;
+ else {
+ $person = find_diaspora_person_by_handle($diaspora_handle);
+
+ if(! is_array($person)) {
+ logger('diaspora_like: unable to find author details');
+ return;
+ }
+ }
+
$uri = $diaspora_handle . ':' . $guid;
$activity = ACTIVITY_LIKE;