]> git.mxchange.org Git - friendica.git/commitdiff
still need the original author information for comments and likes
authorZach Prezkuta <fermion@gmx.com>
Sun, 10 Jun 2012 14:41:23 +0000 (08:41 -0600)
committerZach Prezkuta <fermion@gmx.com>
Sat, 16 Jun 2012 16:25:33 +0000 (10:25 -0600)
include/diaspora.php

index e91ebf442aadc405655736f09ba5ce3ca8814b26..ecf1fd7a9808a6c01da73aea604e3c7841965dc0 100755 (executable)
@@ -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;