fix(chat): fetch public keys per user - #96
Conversation
|
Big fan of xurl, thanks for building and maintaining it. Confirming the same behavior on a matching setup, and +1 for the per-user route. Environment: macOS arm64, xurl v1.3.1, OAuth 2.0 user context, X app on Pay-per-use, chat keys restored via Juicebox. Repro before the fix:
Verified this PR branch locally: built with |
|
Thanks for the detailed independent verification — especially testing a live thread with a KeyChange event and repeated reads. That confirms the per-user route fixes the issue in another production setup. No additional changes are planned from my side; this is ready for maintainer review. |
Summary
GET /2/users/:id/public_keysinstead of the batch endpointuser_idon each returned keyWhy
Some production X apps can access the per-user public-key endpoint but receive
client-not-enrolledfromGET /2/users/public_keys?ids=..., even when the batch contains a single user. That preventsxurl chat readfrom loading signing keys and verifying messages.Using the per-user route trades one batch request for one request per participant, but works across apps that are not enrolled for the batch endpoint and preserves the same result shape for callers.
Verification
go test ./apigo test ./...go vet ./...Fixes #94