`QuotedTweet.self_thread` is optional in syndication responses

Open Beginner friendly
#225 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
api

Research direction

Start in packages/react-tweet/src/api/types/tweet.ts at the QuotedTweet definition and compare its required fields with the example syndication response in the issue. Verify the response shape for self_thread, then update the type so it accurately represents the API and run the relevant package checks or tests to confirm the type change.

Written by the indexing model from the issue text.

Description

react-tweet@3.3.1 requires QuotedTweet.self_thread to exist based on the type in tweet.ts.

However, the actual HTTP response doesn't have self_thread, as shown in the example below:

$ curl -fsSL https://react-tweet.vercel.app/api/tweet/1523695856074969088 | jq '.data.quoted_tweet.text'
"“It’s full of stars!” ✨\n\nThis mosaic represents a sparkling turning point as we #UnfoldTheUniverse. #NASAWebb’s mirrors are now fully aligned! Next is instrument calibration, the final phase before Webb is ready for science: https://t.co/PcAxajyMfI\n\nWhat do we see here? ⤵️ https://t.co/qzdZRbsgRF"

$ curl -fsSL https://react-tweet.vercel.app/api/tweet/1523695856074969088 | jq '.data.quoted_tweet.self_thread'
null
Dominant language
TypeScript
Stars
1.9k
Forks
119
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vercel/react-tweet

All issues in vercel/react-tweet

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.