TuxedoTako / 4chan-xt

Adds various features to anonymous imageboards.
Other
110 stars 8 forks source link

Resurrect Quotes: Deleted Post's Reference to Another Board Wrongly Linked to the Current Thread #27

Open AlifianK opened 8 months ago

AlifianK commented 8 months ago

This bug requires a very specific condition to be triggered. Take this deleted post for example, it contains a reference to a post in another board that isn't deleted, but it referenced the archived version of it even though the post is still alive, and after the post is retrieved from the archive, it wrongly links to the thread of the deleted post, instead of the origin of the referenced post.

TuxedoTako commented 8 months ago

I see. The way links to other threads work is that the link is usually included in the vanilla page, and 4chan X(T) just uses that. The data from the archives doesn't have those nice links. Posts from the current thread are checked by the data from the current page, but for this to work I have to fetch other threads.

I don't know if I can just make that function async. Also looking at the code:

https://github.com/TuxedoTako/4chan-xt/blob/20a0cf72f9d61740fb0a926532ef893cede78503/src/Quotelinks/QuotePreview.js#L49

https://github.com/TuxedoTako/4chan-xt/blob/20a0cf72f9d61740fb0a926532ef893cede78503/src/General/Get.js#L46-L61

The existing quote preview also relies on the thread id also being in the link. I just checked how hovering over a link from an other thread works, and the entire thread JSON is fetched. I don't know if there's a way to fetch without thread id, I'm not really familiar with 4chan's back end.