Merge pull request #3730 from annando/ostatus-complete

OStatus: Thread completition hadn't worked for (some) Mastodon systems
This commit is contained in:
Tobias Diekershoff 2017-09-24 18:53:35 +02:00 committed by GitHub
commit 3e17335418

View File

@ -366,6 +366,11 @@ class ostatus {
foreach (array_reverse($entrylist) AS $entry) { foreach (array_reverse($entrylist) AS $entry) {
// fetch the author // fetch the author
$authorelement = $xpath->query('/atom:entry/atom:author', $entry); $authorelement = $xpath->query('/atom:entry/atom:author', $entry);
if ($authorelement->length == 0) {
$authorelement = $xpath->query('atom:author', $entry);
}
if ($authorelement->length > 0) { if ($authorelement->length > 0) {
$author = self::fetchauthor($xpath, $entry, $importer, $contact, $stored); $author = self::fetchauthor($xpath, $entry, $importer, $contact, $stored);
} }
@ -674,7 +679,7 @@ class ostatus {
self::$conv_list[$conversation] = true; 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']) { if (!$conversation_data['success']) {
return; return;
@ -855,7 +860,7 @@ class ostatus {
} }
$stored = false; $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']) { if (!$related_data['success']) {
return; return;