chore(post.html): drop post links to mastodon

This commit is contained in:
Cory Dransfeldt 2025-03-28 17:30:17 -07:00
parent d5c31a87d3
commit d73444d714
No known key found for this signature in database
6 changed files with 3 additions and 25 deletions

View file

@ -83,7 +83,6 @@ class MastodonPostHandler extends ApiHandler
if ($mastodonPostUrl) {
if (strpos($item["link"], $this->baseUrl . "/posts") !== false) {
$slug = str_replace($this->baseUrl, "", $item["link"]);
$this->updatePostWithMastodonUrl($slug, $mastodonPostUrl);
echo "Posted and stored URL: {$item["link"]}\n";
}
} else {
@ -209,15 +208,6 @@ class MastodonPostHandler extends ApiHandler
}
}
private function updatePostWithMastodonUrl(
string $slug,
string $mastodonPostUrl
): void {
$data = ["mastodon_url" => $mastodonPostUrl];
$this->fetchFromPostgREST("posts", "slug=eq.{$slug}&mastodon_url=is.null", "PATCH", $data);
}
private function truncateContent(
string $title,
string $description,