]> git.mxchange.org Git - friendica.git/commitdiff
OStatus: Thread completition hadn't worked for (some) Mastodon systems
authorMichael <heluecht@pirati.ca>
Sun, 24 Sep 2017 15:31:09 +0000 (15:31 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 24 Sep 2017 15:31:09 +0000 (15:31 +0000)
include/ostatus.php

index 19392b91731a8f8024c9b86aa950c086ce33430d..25e51ec609e47f46c4aaacc97ead7c8864b3540d 100644 (file)
@@ -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;