diff --git a/src/Services/Mastodon_api.php b/src/Services/Mastodon_api.php index d3de647..de8adb9 100644 --- a/src/Services/Mastodon_api.php +++ b/src/Services/Mastodon_api.php @@ -205,7 +205,6 @@ class Mastodon_api foreach ($parameters['headers'] as $key => $value) { $curl->setHeader($key, $value); } - // echo "
",print_r($parameters['body']),"
"; if (isset($parameters["method"]) && $parameters['method'] == "POST") { $response = $curl->post($url, $parameters['body']); }else if (isset($parameters["method"]) && $parameters['method'] == "GET") { @@ -1276,6 +1275,16 @@ class Mastodon_api $Polls->setMinExpiration($instantParams['configuration']['polls']['min_expiration']); $Polls->setMaxExpiration($instantParams['configuration']['polls']['max_expiration']); } + } else if (isset($instantParams['pleroma'])) { + if (isset($instantParams['poll_limits'])) { + $Polls->setMaxOptions($instantParams['poll_limits']['max_options']); + $Polls->setMaxCharactersPerOption($instantParams['poll_limits']['max_option_chars']); + $Polls->setMinExpiration($instantParams['poll_limits']['min_expiration']); + $Polls->setMaxExpiration($instantParams['poll_limits']['max_expiration']); + } + if(isset($instantParams['max_toot_chars'])) { + $Statuses->setMaxCharacters($instantParams['max_toot_chars']); + } } $Configuration->setStatuses($Statuses); $Configuration->setMediaAttachments($MediaAttachments);