From 9d7ab9d94182d78d6223eb4ad7ccf1f5bbf05d6d Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 24 Sep 2017 15:31:09 +0000 Subject: [PATCH] OStatus: Thread completition hadn't worked for (some) Mastodon systems --- include/ostatus.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/ostatus.php b/include/ostatus.php index 19392b9173..25e51ec609 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -366,6 +366,11 @@ class ostatus { foreach (array_reverse($entrylist) AS $entry) { // fetch the author $authorelement = $xpath->query('/atom:entry/atom:author', $entry); + + if ($authorelement->length == 0) { + $authorelement = $xpath->query('atom:author', $entry); + } + if ($authorelement->length > 0) { $author = self::fetchauthor($xpath, $entry, $importer, $contact, $stored); } @@ -674,7 +679,7 @@ class ostatus { self::$conv_list[$conversation] = true; - $conversation_data = z_fetch_url($conversation, false, $redirects, array('accept_content' => 'application/atom+xml')); + $conversation_data = z_fetch_url($conversation, false, $redirects, array('accept_content' => 'application/atom+xml, text/html')); if (!$conversation_data['success']) { return; @@ -855,7 +860,7 @@ class ostatus { } $stored = false; - $related_data = z_fetch_url($related, false, $redirects, array('accept_content' => 'application/atom+xml')); + $related_data = z_fetch_url($related, false, $redirects, array('accept_content' => 'application/atom+xml, text/html')); if (!$related_data['success']) { return;