From: Mikael Nordfeldth Date: Sat, 5 Aug 2017 14:21:34 +0000 (+0200) Subject: Mastodon replies 201 Created for salmon slaps. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=090f4a9474c641d4c78170eb952976f22f798c06;hp=0ef483fb4a77d0bace9db45cc10dd60a5b144d9b;p=quix0rs-gnu-social.git Mastodon replies 201 Created for salmon slaps. --- diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 18e8539eb4..7f7f04c50a 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -1498,9 +1498,11 @@ class OStatusPlugin extends Plugin return true; } - // 200 OK is the best response - // 202 Accepted is what we get from Diaspora for example - if (!in_array($response->getStatus(), array(200, 202))) { + // The different kinds of accepted responses... + // 200 OK means it's all ok + // 201 Created is what Mastodon returns when it's ok + // 202 Accepted is what we get from Diaspora, also good + if (!in_array($response->getStatus(), array(200, 201, 202))) { common_log(LOG_ERR, sprintf('Salmon (from profile %d) endpoint %s returned status %s: %s', $magic_env->getActor()->getID(), $endpoint_uri, $response->getStatus(), $response->getBody())); return true;