]> git.mxchange.org Git - friendica.git/commitdiff
Use the display name (full name) instead of the nick name when importing.
authorMichael Vogel <icarus@dabo.de>
Sat, 13 Jun 2015 07:07:13 +0000 (09:07 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 13 Jun 2015 07:07:13 +0000 (09:07 +0200)
include/ostatus_conversation.php

index a83313a0d3e34b6bf69cd5ba90b160e42ab3dc8b..e61f5fab4f41caecd0929cfe92d974033883a66a 100644 (file)
@@ -253,12 +253,16 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio
                $arr["thr-parent"] = $parent_uri;
                $arr["created"] = $single_conv->published;
                $arr["edited"] = $single_conv->published;
-               //$arr["owner-name"] = $single_conv->actor->contact->displayName;
-               $arr["owner-name"] = $single_conv->actor->contact->preferredUsername;
+               $arr["owner-name"] = $single_conv->actor->contact->displayName;
+               //$arr["owner-name"] = $single_conv->actor->contact->preferredUsername;
+               if ($arr["owner-name"] == '')
+                       $arr["owner-name"] = $single_conv->actor->portablecontacts_net->displayName;
+               if ($arr["owner-name"] == '')
+                       $arr["owner-name"] = $single_conv->actor->displayName;
                if ($arr["owner-name"] == '')
                        $arr["owner-name"] = $single_conv->actor->portablecontacts_net->preferredUsername;
                if ($arr["owner-name"] == '')
-                       $arr["owner-name"] =  $single_conv->actor->displayName;
+                       $arr["owner-name"] = $single_conv->actor->preferredUsername;
 
                $arr["owner-link"] = $actor;
                $arr["owner-avatar"] = $single_conv->actor->image->url;