Page MenuHomePhabricator

D10585.id35531.diff
No OneTemporary

D10585.id35531.diff

diff --git a/lib/components/keyserver-connection-handler.js b/lib/components/keyserver-connection-handler.js
--- a/lib/components/keyserver-connection-handler.js
+++ b/lib/components/keyserver-connection-handler.js
@@ -4,9 +4,11 @@
import { logOutActionTypes, useLogOut } from '../actions/user-actions.js';
import { connectionSelector } from '../selectors/keyserver-selectors.js';
+import { IdentityClientContext } from '../shared/identity-client-context.js';
import type { BaseSocketProps } from '../socket/socket.react.js';
import { useDispatchActionPromise } from '../utils/action-utils.js';
import { useSelector } from '../utils/redux-utils.js';
+import { usingCommServicesAccessToken } from '../utils/services-utils.js';
import { ashoatKeyserverID } from '../utils/validation-utils.js';
type Props = {
@@ -30,6 +32,26 @@
}
}, [callLogOut, hasConnectionIssue, dispatchActionPromise]);
+ const identityClient = React.useContext(
+ IdentityClientContext,
+ )?.identityClient;
+ React.useEffect(() => {
+ if (!usingCommServicesAccessToken) {
+ return;
+ }
+
+ void (async () => {
+ try {
+ await identityClient?.getKeyserverKeys(keyserverID);
+ } catch (e) {
+ console.log(
+ `Error getting keys for keyserver with id ${keyserverID}`,
+ e,
+ );
+ }
+ })();
+ }, [keyserverID, identityClient]);
+
if (keyserverID !== ashoatKeyserverID) {
return null;
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 10:12 AM (20 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2574970
Default Alt Text
D10585.id35531.diff (1 KB)

Event Timeline