From a6a3c268bb399f52f0c091659ebdfc31a62b832d Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 10 Nov 2018 08:24:10 -0500 Subject: [PATCH] Use atom:author/atom:uri as profile-link in Feed::import - Use atom:author/atom:id as profile-id --- src/Protocol/Feed.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 71ebe5506b..d63b57b8c9 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -123,7 +123,13 @@ class Feed { $author["author-name"] = $value; } if ($simulate) { - $author["author-id"] = XML::getFirstNodeValue($xpath, '/atom:feed/atom:author/atom:uri/text()'); + $author["author-id"] = XML::getFirstNodeValue($xpath, '/atom:feed/atom:author/atom:id/text()'); + + // See https://tools.ietf.org/html/rfc4287#section-3.2.2 + $value = XML::getFirstNodeValue($xpath, 'atom:author/atom:uri/text()'); + if ($value != "") { + $author["author-link"] = $value; + } $value = XML::getFirstNodeValue($xpath, 'atom:author/poco:preferredUsername/text()'); if ($value != "") { -- 2.39.5