fix: improve article detection and quote tweet display
- Use startsWith check instead of fragile length heuristic for detecting full article body vs preview mode - Add media display for quote tweets (🖼️/🎬/🔄 indicators) - Add preview_text to GraphqlTweetResult type definition to avoid type assertions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
committed by
Peter Steinberger
co-authored by
Claude Opus 4.5
parent
0475a2e1b6
commit
d40c048333
@@ -168,10 +168,7 @@ export function extractArticleMetadata(
|
||||
}
|
||||
|
||||
// preview_text is available in home timeline responses
|
||||
const previewText = firstText(
|
||||
(articleResult as { preview_text?: string }).preview_text,
|
||||
(article as { preview_text?: string }).preview_text,
|
||||
);
|
||||
const previewText = firstText(articleResult.preview_text, article.preview_text);
|
||||
|
||||
return { title, previewText };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user