From 54147395362ed9697f2f054bcf78e306cb8965a1 Mon Sep 17 00:00:00 2001 From: James Griffin Date: Fri, 27 Mar 2026 11:02:23 -0300 Subject: [PATCH] Remove reply/like stats and per-post permalinks from thread rendering Co-Authored-By: Claude Sonnet 4.6 --- extension.php | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/extension.php b/extension.php index 206c0a5..b10ef2c 100644 --- a/extension.php +++ b/extension.php @@ -250,36 +250,17 @@ final class BlueskyThreadsExtension extends Minz_Extension { $text = $record['text'] ?? ''; $facets = $record['facets'] ?? []; - $rkey = basename(rtrim($post['uri'] ?? '', '/')); - $postUrl = 'https://bsky.app/profile/' . rawurlencode($handle) . '/post/' . $rkey; - $textHtml = nl2br($this->applyFacets($text, $facets)); $embedHtml = $embed !== null ? $this->renderEmbed($embed) : ''; - $stats = ''; - foreach ([ - 'replyCount' => 'Reply', - 'repostCount' => 'Repost', - 'likeCount' => 'Like', - ] as $key => $label) { - if (isset($post[$key]) && (int) $post[$key] > 0) { - $n = (int) $post[$key]; - $stats .= '' . $n . ' ' . $label . ($n !== 1 ? 's' : '') . ''; - } - } - $rootStyle = 'border:1px solid #cfd9de;border-radius:12px;padding:12px 16px;margin-bottom:12px;'; $replyStyle = 'padding:10px 12px;margin:4px 0;'; $style = $isRoot ? $rootStyle : $replyStyle; return << -
{$textHtml}
+
{$textHtml}
{$embedHtml} -
- {$stats} - View on Bluesky ↗ -
HTML; }