diff --git a/src/mapeo-project.js b/src/mapeo-project.js index 8bac0de7..89996dc9 100644 --- a/src/mapeo-project.js +++ b/src/mapeo-project.js @@ -627,7 +627,7 @@ export class MapeoProject extends TypedEmitter { } /** - * @param {Pick} value + * @param {Pick} value * @returns {Promise} */ async [kSetOwnDeviceInfo](value) { @@ -640,6 +640,7 @@ export class MapeoProject extends TypedEmitter { const doc = { name: value.name, deviceType: value.deviceType, + selfHostedServerDetails: value.selfHostedServerDetails, schemaName: /** @type {const} */ ('deviceInfo'), } diff --git a/src/member-api.js b/src/member-api.js index 55085597..3af048a2 100644 --- a/src/member-api.js +++ b/src/member-api.js @@ -36,6 +36,8 @@ import { ROLES, isRoleIdForNewInvite } from './roles.js' * @prop {DeviceInfo['name']} [name] * @prop {DeviceInfo['deviceType']} [deviceType] * @prop {DeviceInfo['createdAt']} [joinedAt] + * @prop {object} [selfHostedServerDetails] + * @prop {string} selfHostedServerDetails.baseUrl */ export class MemberApi extends TypedEmitter { @@ -304,6 +306,8 @@ export class MemberApi extends TypedEmitter { memberInfo.name = deviceInfo?.name memberInfo.deviceType = deviceInfo?.deviceType memberInfo.joinedAt = deviceInfo?.createdAt + memberInfo.selfHostedServerDetails = + deviceInfo?.selfHostedServerDetails } catch (err) { // Attempting to get someone else may throw because sync hasn't occurred or completed // Only throw if attempting to get themself since the relevant information should be available