diff --git a/plugins/WebHooks/WebHooks.php b/plugins/WebHooks/WebHooks.php index ca13aa061d..e5bd175ef3 100644 --- a/plugins/WebHooks/WebHooks.php +++ b/plugins/WebHooks/WebHooks.php @@ -89,7 +89,8 @@ class WebHooks extends Plugin $json = str_replace('"activity":"%activity%"', '"activity":' . \Plugin\ActivityPub\Util\Model\Activity::toJson($activity), json_encode($data)); Log::debug("WebHooks: POST {$target} on behalf of actor {$actor->getId()} ({$actor->getNickname()})", [$data, ['json' => $json]]); try { - HTTPClient::post($target, ['body' => $json, 'headers' => ['content-type' => 'application/json', 'user-agent' => 'GNU social']]); + $method = Common::config('plugin_webhooks', 'method'); + HTTPClient::{$method}($target, ['body' => $json, 'headers' => ['content-type' => 'application/json', 'user-agent' => 'GNU social']]); } catch (Exception $e) { Log::debug("WebHooks: Failed POST {$target} on behalf of actor {$actor->getId()} ({$actor->getNickname()})", [$e]); } diff --git a/social.yaml b/social.yaml index 30adae1620..e4eff3d6b2 100644 --- a/social.yaml +++ b/social.yaml @@ -135,6 +135,9 @@ parameters: max_px: 64000 max_file_size: 4000000 + plugin_webhooks: + method: post + theme: server: ssl: