diff --git a/lib/types/identity-service-types.js b/lib/types/identity-service-types.js --- a/lib/types/identity-service-types.js +++ b/lib/types/identity-service-types.js @@ -184,6 +184,7 @@ // updating device list is possible only on Native // web cannot be a primary device, so there's no need to expose it to JS +updateDeviceList?: (newDeviceList: SignedDeviceList) => Promise; + +syncPlatformDetails: () => Promise; +uploadKeysForRegisteredDeviceAndLogIn: ( userID: string, signedNonce: SignedNonce, diff --git a/native/identity-service/identity-service-context-provider.react.js b/native/identity-service/identity-service-context-provider.react.js --- a/native/identity-service/identity-service-context-provider.react.js +++ b/native/identity-service/identity-service-context-provider.react.js @@ -642,6 +642,18 @@ payload, ); }, + syncPlatformDetails: async () => { + const { + deviceID: authDeviceID, + userID, + accessToken: authAccessToken, + } = await getAuthMetadata(); + await commRustModule.syncPlatformDetails( + userID, + authDeviceID, + authAccessToken, + ); + }, getFarcasterUsers: async (farcasterIDs: $ReadOnlyArray) => { const farcasterUsersJSONString = await commRustModule.getFarcasterUsers(farcasterIDs); diff --git a/web/grpc/identity-service-client-wrapper.js b/web/grpc/identity-service-client-wrapper.js --- a/web/grpc/identity-service-client-wrapper.js +++ b/web/grpc/identity-service-client-wrapper.js @@ -41,6 +41,7 @@ import { VersionInterceptor, AuthInterceptor } from './interceptor.js'; import * as IdentityAuthClient from '../protobufs/identity-auth-client.cjs'; import * as IdentityAuthStructs from '../protobufs/identity-auth-structs.cjs'; +import * as identityUnauthStructs from '../protobufs/identity-unauth-structs.cjs'; import { DeviceKeyUpload, Empty, @@ -578,6 +579,14 @@ return assertWithValidator(peersDeviceLists, peersDeviceListsValidator); }; + syncPlatformDetails: () => Promise = async () => { + const client = this.authClient; + if (!client) { + throw new Error('Identity service client is not initialized'); + } + await client.syncPlatformDetails(new identityUnauthStructs.Empty()); + }; + getFarcasterUsers: ( farcasterIDs: $ReadOnlyArray, ) => Promise<$ReadOnlyArray> = async farcasterIDs => { diff --git a/web/grpc/identity-service-context-provider.react.js b/web/grpc/identity-service-context-provider.react.js --- a/web/grpc/identity-service-context-provider.react.js +++ b/web/grpc/identity-service-context-provider.react.js @@ -136,6 +136,7 @@ 'getDeviceListHistoryForUser', ), getDeviceListsForUsers: proxyMethodToWorker('getDeviceListsForUsers'), + syncPlatformDetails: proxyMethodToWorker('syncPlatformDetails'), getFarcasterUsers: proxyMethodToWorker('getFarcasterUsers'), linkFarcasterAccount: proxyMethodToWorker('linkFarcasterAccount'), unlinkFarcasterAccount: proxyMethodToWorker('unlinkFarcasterAccount'),