chore(post.html): drop post links to mastodon
This commit is contained in:
parent
d5c31a87d3
commit
d73444d714
6 changed files with 3 additions and 25 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue