From bf72b74a01906ffece16335cdc49b97c497db7de Mon Sep 17 00:00:00 2001 From: James Griffin Date: Sun, 5 Apr 2026 09:39:41 -0300 Subject: [PATCH] Render embedded quoted posts as blockquotes with handle permalink Fixes #1. Replaces the plain div wrapper and separate "View on Bluesky" link with a
element, and makes the @handle the permalink to the quoted post. Co-Authored-By: Claude Sonnet 4.6 --- extension.php | 9 +++------ tests/BlueskyThreadsTest.php | 7 ++++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/extension.php b/extension.php index 8184632..0d74509 100644 --- a/extension.php +++ b/extension.php @@ -376,17 +376,14 @@ final class BlueskyThreadsExtension extends Minz_Extension { } return << +
{$displayName} - @{$this->e($handle)} + @{$this->e($handle)}
{$text}
{$embedsHtml} -
- View on Bluesky ↗ -
- +
HTML; } diff --git a/tests/BlueskyThreadsTest.php b/tests/BlueskyThreadsTest.php index 9cd4648..01dff6f 100644 --- a/tests/BlueskyThreadsTest.php +++ b/tests/BlueskyThreadsTest.php @@ -164,14 +164,15 @@ class BlueskyThreadsTest extends TestCase { 'Quoted post text must be rendered as an embed'); } - /** Quoted posts include a "View on Bluesky" link; thread posts do not. */ + /** Quoted posts use a blockquote with a handle permalink; thread posts have no permalink. */ public function testViewOnBskyLinksArePresent(): void { $data = json_decode(file_get_contents(__DIR__ . '/fixtures/thread_3mhtk7awhrp26.json'), true); $html = $this->call('renderThread', $data['thread'], true); $this->assertStringNotContainsString('3mhtk7awhrp26', $html, 'Thread post rkey must not appear as a permalink'); - $this->assertStringContainsString('3mhtjo3rtkn26', $html, 'Quoted post rkey must appear in its View on Bluesky link'); - $this->assertStringContainsString('View on Bluesky', $html); + $this->assertStringContainsString('3mhtjo3rtkn26', $html, 'Quoted post rkey must appear in the handle permalink'); + $this->assertStringContainsString('assertStringNotContainsString('View on Bluesky', $html); } /** -- 2.49.1