Skip to content

fix(twitter): handle TweetPreviewDisplay for subscriber-only posts#21957

Open
Jsongcloud wants to merge 4 commits into
DIYgod:masterfrom
Jsongcloud:fix/twitter-subscriber-preview-tweet
Open

fix(twitter): handle TweetPreviewDisplay for subscriber-only posts#21957
Jsongcloud wants to merge 4 commits into
DIYgod:masterfrom
Jsongcloud:fix/twitter-subscriber-preview-tweet

Conversation

@Jsongcloud
Copy link
Copy Markdown

@Jsongcloud Jsongcloud commented May 9, 2026

Involved Issue / 该 PR 相关 Issue

Close #

Example for the Proposed Route(s) / 路由地址示例

NOROUTE

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

Fix subscriber-only posts (TweetPreviewDisplay) not appearing in /twitter/user/:id feed.

The X API returns subscriber-only posts with __typename: "TweetPreviewDisplay", which has a different structure from regular Tweet objects. The parser silently dropped these entries because the type was not handled.

Added a handler in both web-api/utils.ts and mobile-api/api.ts. The check must occur before the tweet = tweet.tweet reassignment. Preview text is included in the feed with a 🔒 prefix.

@github-actions github-actions Bot added the route label May 9, 2026
@Jsongcloud Jsongcloud closed this May 9, 2026
@Jsongcloud Jsongcloud deleted the fix/twitter-subscriber-preview-tweet branch May 9, 2026 21:22
@Jsongcloud Jsongcloud changed the title Fix/twitter handle TweetPreviewDisplay for subscriber-only posts fix(twitter): handle TweetPreviewDisplay for subscriber-only posts May 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Successfully generated as following:

http://localhost:1200/twitter/user/DIYgod - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/user/:id/:routeParams?
Full Route: /twitter/user/DIYgod
Node Version: v24.15.0
Git Hash: c8203576

@github-actions github-actions Bot added the auto: not ready to review Users can't get the RSS feed output according to automated testing results label May 9, 2026
@Jsongcloud Jsongcloud restored the fix/twitter-subscriber-preview-tweet branch May 9, 2026 21:25
@github-actions github-actions Bot reopened this May 9, 2026
@github-actions github-actions Bot added auto: not ready to review Users can't get the RSS feed output according to automated testing results and removed auto: not ready to review Users can't get the RSS feed output according to automated testing results labels May 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Successfully generated as following:

http://localhost:1200/twitter/user/DIYgod - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/user/:id/:routeParams?
Full Route: /twitter/user/DIYgod
Node Version: v24.15.0
Git Hash: c8203576

@Jsongcloud Jsongcloud closed this May 9, 2026
@Jsongcloud Jsongcloud reopened this May 9, 2026
@github-actions github-actions Bot added auto: route test bypassed and removed auto: not ready to review Users can't get the RSS feed output according to automated testing results labels May 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Auto Review

No clear rule violations found in the current diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant