mirror of
https://framagit.org/tom79/fediplan.git
synced 2025-04-05 21:51:50 +02:00
Fix Pleroma issue
This commit is contained in:
parent
7a7c3e6974
commit
adcce820dd
1 changed files with 10 additions and 1 deletions
|
@ -205,7 +205,6 @@ class Mastodon_api
|
||||||
foreach ($parameters['headers'] as $key => $value) {
|
foreach ($parameters['headers'] as $key => $value) {
|
||||||
$curl->setHeader($key, $value);
|
$curl->setHeader($key, $value);
|
||||||
}
|
}
|
||||||
// echo "<pre>",print_r($parameters['body']),"</pre>";
|
|
||||||
if (isset($parameters["method"]) && $parameters['method'] == "POST") {
|
if (isset($parameters["method"]) && $parameters['method'] == "POST") {
|
||||||
$response = $curl->post($url, $parameters['body']);
|
$response = $curl->post($url, $parameters['body']);
|
||||||
}else if (isset($parameters["method"]) && $parameters['method'] == "GET") {
|
}else if (isset($parameters["method"]) && $parameters['method'] == "GET") {
|
||||||
|
@ -1276,6 +1275,16 @@ class Mastodon_api
|
||||||
$Polls->setMinExpiration($instantParams['configuration']['polls']['min_expiration']);
|
$Polls->setMinExpiration($instantParams['configuration']['polls']['min_expiration']);
|
||||||
$Polls->setMaxExpiration($instantParams['configuration']['polls']['max_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->setStatuses($Statuses);
|
||||||
$Configuration->setMediaAttachments($MediaAttachments);
|
$Configuration->setMediaAttachments($MediaAttachments);
|
||||||
|
|
Loading…
Add table
Reference in a new issue