From 4704933b6e93c5495be7776e40576ed2b51997e1 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 13 Jun 2015 09:07:13 +0200 Subject: [PATCH] Use the display name (full name) instead of the nick name when importing. --- include/ostatus_conversation.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/ostatus_conversation.php b/include/ostatus_conversation.php index a83313a0d3..e61f5fab4f 100644 --- a/include/ostatus_conversation.php +++ b/include/ostatus_conversation.php @@ -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; -- 2.39.5