git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 090f4a94 authored by mmn's avatar mmn

Mastodon replies 201 Created for salmon slaps.

parent 0ef483fb
...@@ -1498,9 +1498,11 @@ class OStatusPlugin extends Plugin ...@@ -1498,9 +1498,11 @@ class OStatusPlugin extends Plugin
return true; return true;
} }
// 200 OK is the best response // The different kinds of accepted responses...
// 202 Accepted is what we get from Diaspora for example // 200 OK means it's all ok
if (!in_array($response->getStatus(), array(200, 202))) { // 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', 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())); $magic_env->getActor()->getID(), $endpoint_uri, $response->getStatus(), $response->getBody()));
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment