pugson / react-farcaster-embed

Display an embedded cast from Farcaster in your React app. Works with Next.js SSR.
https://npm.im/react-farcaster-embed
The Unlicense
76 stars 8 forks source link

Replies to Replies do not Render properly #9

Closed thebitparticle closed 3 months ago

thebitparticle commented 3 months ago

The below code checks only for reply of the cast and it works fine but when you pass cast url of a reply of a reply, it breaks and shows the OG cast only because the code below checks only for 3rd item in the list and not the 4th item

if (
      cast.result.casts[2] &&
      cast.result.casts[2].author.username === username &&
      cast.result.casts[2].hash.includes(hash)
    ) {
      return cast.result.casts[2];
    }

Sample reply of an reply does not render properly - https://www.warpcast.com/saxenasaheb.eth/0x18609044"

pugson commented 3 months ago

Thanks for flagging the issue. This should be fixed when you update to 1.8.3