Page MenuHomePhabricator

[lib] Make api-request-handler keyserver-specific
ClosedPublic

Authored by tomek on Feb 15 2024, 4:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 26, 10:54 AM
Unknown Object (File)
Tue, Jun 25, 1:48 PM
Unknown Object (File)
Thu, Jun 13, 1:46 AM
Unknown Object (File)
Wed, Jun 12, 3:23 PM
Unknown Object (File)
Fri, Jun 7, 7:17 PM
Unknown Object (File)
Fri, Jun 7, 7:17 PM
Unknown Object (File)
Fri, Jun 7, 7:17 PM
Unknown Object (File)
Fri, Jun 7, 7:16 PM
Subscribers

Details

Summary

Select a connection status from the given keyserver.
Modify socketAPIHandlers to be a map from keyserver to SocketAPIHandler.

https://linear.app/comm/issue/ENG-5778/update-apirequesthandler

Test Plan

Added console.logs in fetchResponse to check if it is called and if a request is matched with response. Focused a thread and checked if proper request and response were generated.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Feb 15 2024, 4:27 AM
lib/keyserver-conn/call-keyserver-endpoint-provider.react.js
446–452 ↗(On Diff #37237)

I guess this works, but I wonder if it would be more idiomatic to move this to the provider... socketAPIHandlers could be a ref, and registerActiveSocket could be a utility exposed via the context

tomek marked an inline comment as done.

Move map to a context

This revision is now accepted and ready to land.Feb 21 2024, 10:34 PM