Switch Bridgy syndication from Micropub to webmention

Bridgy's Micropub endpoint required per-silo access tokens and posted
raw markdown content directly. Switch to Bridgy's webmention publish
endpoint instead: POST source/target to /publish/webmention and let
Bridgy re-fetch the note page, which now carries hidden verification
links for silos not yet syndicated. Removes the now-unused
config/bridgy.php and BRIDGY_MASTODON_TOKEN env var, and caps both
jobs to a single try since retries would send Bridgy a duplicate
publish webmention.
This commit is contained in:
Jonny Barnes 2026-07-14 17:36:25 +01:00
commit db09718a96
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
9 changed files with 167 additions and 94 deletions

View file

@ -25,18 +25,20 @@ class ReprocessMediaImages extends Command
$dryRun = $this->option('dry-run');
$this->info("Found {$media->count()} images to reprocess." . ($dryRun ? ' (dry run)' : ''));
$this->info("Found {$media->count()} images to reprocess.".($dryRun ? ' (dry run)' : ''));
foreach ($media as $item) {
$path = $item->path;
if (! Storage::disk('public')->exists($path)) {
$this->warn("{$path}: original not found on public disk, skipping.");
continue;
}
if ($dryRun) {
$this->line("{$path} ({$item->image_widths}px wide)");
continue;
}
@ -46,7 +48,8 @@ class ReprocessMediaImages extends Command
$file = Storage::disk('public')->get($path);
$image = $manager->read($file);
} catch (DecoderException) {
$this->warn(" Could not decode image, skipping.");
$this->warn(' Could not decode image, skipping.');
continue;
}
@ -60,9 +63,9 @@ class ReprocessMediaImages extends Command
$small = $image->scale(width: 500);
Storage::disk('public')->put($basename.'-small.'.$extension, (string) $small->encode());
$this->info(" Done.");
$this->info(' Done.');
}
$this->info('Reprocessing complete.' . ($dryRun ? ' (dry run — no files were changed)' : ''));
$this->info('Reprocessing complete.'.($dryRun ? ' (dry run — no files were changed)' : ''));
}
}