mastodonapi.php aktualisiert
This commit is contained in:
parent
966adcf995
commit
a2c77ebac7
1 changed files with 3 additions and 3 deletions
|
|
@ -63,7 +63,7 @@ class YellowMastodonAPI {
|
|||
|
||||
$apiUrl = rtrim($instanceUrl, "/") . "/api/v1/accounts/" . $accountId . "/statuses?limit=20";
|
||||
|
||||
// Header dynamisch aufbauen
|
||||
// HTTP Header dynamisch aufbauen
|
||||
$headers = "User-Agent: YellowMastodonAPI\r\n";
|
||||
if (!empty($accessToken)) {
|
||||
$headers .= "Authorization: Bearer " . $accessToken . "\r\n";
|
||||
|
|
@ -99,9 +99,9 @@ class YellowMastodonAPI {
|
|||
foreach ($posts as $post) {
|
||||
$contentHtml = $post['content'];
|
||||
$createdAt = $post['created_at'];
|
||||
$tags = array_map('strtolower', array_column($post['tags'], 'name'));
|
||||
$tags = array_column($post['tags'], 'name');
|
||||
|
||||
if (!empty($hashtag) && !in_array(strtolower($hashtag), $tags)) {
|
||||
if (!empty($hashtag) && !in_array(strtolower($hashtag), array_map('strtolower', $tags))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue