Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix optimistic getPostThread for URIs with handle #2946

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Nov 4, 2024

Previously, getPostThread read-after-write handling was not taking at://<handle>/... URIs into account. This resulted in the PDS returning 404 for post thread query whenever relay is lagging, which resulted in a confusing UX in the app (the post would show up but clicking into it would show 404). This should fix that.

Test Plan

See two additions to tests. One of those worked before, the other one failed. Now both work.

@gaearon gaearon requested review from devinivy and dholms November 4, 2024 23:49
@gaearon gaearon force-pushed the resolve-handles-postthread-raw branch from 7f25a8b to cb3e296 Compare November 4, 2024 23:52
if (account) {
uri.hostname = account.did
}
}
if (uri.hostname !== requester) throw err
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this check would previously lead to 404

Copy link
Collaborator

@dholms dholms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup yup this looks great 👌

@dholms dholms merged commit 9e18ab6 into main Nov 5, 2024
10 checks passed
@dholms dholms deleted the resolve-handles-postthread-raw branch November 5, 2024 00:28
@github-actions github-actions bot mentioned this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants