From 2a4ebaa438c0e4c84e20d2567d708e472a7c7192 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 5 Mar 2016 01:30:49 +0100 Subject: [PATCH] Small cleanup --- include/diaspora2.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/diaspora2.php b/include/diaspora2.php index 031058ab75..939a816f40 100644 --- a/include/diaspora2.php +++ b/include/diaspora2.php @@ -553,7 +553,6 @@ class diaspora { $msg = array("message" => $x, "author" => $author); - // We don't really need this, but until the work is unfinished we better will keep this $msg["key"] = self::get_key($msg["author"]); return $msg; @@ -736,10 +735,12 @@ class diaspora { $msg_text = unxmlify($mesg->text); $msg_created_at = datetime_convert("UTC", "UTC", notags(unxmlify($mesg->created_at))); - if ($mesg->diaspora_handle) - $msg_author = notags(unxmlify($mesg->diaspora_handle)); - elseif ($mesg->author) + // "diaspora_handle" is the element name from the old version + // "author" is the element name from the new version + if ($mesg->author) $msg_author = notags(unxmlify($mesg->author)); + elseif ($mesg->diaspora_handle) + $msg_author = notags(unxmlify($mesg->diaspora_handle)); else return false;