Twitter: Fix error after posting

pull/1458/head
Michael 2024-01-21 21:24:08 +00:00
parent 2b391eb368
commit c28af61873
1 changed files with 2 additions and 2 deletions

View File

@ -362,7 +362,7 @@ function twitter_post(int $uid, string $url, string $type, array $data): stdClas
]);
$response = $client->post($url, ['auth' => 'oauth', $type => $data]);
$body = $response->getBodyString()->getContents();
$body = $response->getBody()->getContents();
$status = [
'code' => $response->getStatusCode(),
@ -399,7 +399,7 @@ function twitter_test_connection(int $uid)
$status = [
'code' => $response->getStatusCode(),
'reason' => $response->getReasonPhrase(),
'content' => $response->getBodyString()->getContents()
'content' => $response->getBody()->getContents()
];
DI::pConfig()->set(1, 'twitter', 'last_status', $status);
Logger::info('Test successful', ['uid' => $uid]);