Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello committed Aug 24, 2023
1 parent eb3fd48 commit a0ef01d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/definitions/IServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export interface IServer {
uniqueID: string;
enterpriseModules: IEnterpriseModules;
E2E_Enable: boolean;
supportedVersions: ISupportedVersions;
supportedVersions?: ISupportedVersions;
}

export type TServerModel = IServer & Model;
4 changes: 2 additions & 2 deletions app/lib/services/getServerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const MOCKED_SUPPORTED_VERSIONS: ISupportedVersions = {
}
],
exceptions: {
// domain: string;
// uniqueId: string;
domain: 'https://open.rocket.chat',
uniqueId: '123',
// messages?: Messages[];
versions: [
{
Expand Down
9 changes: 5 additions & 4 deletions app/sagas/selectServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ const upsertServer = async function ({ server, serverInfo }: { server: string; s
await serversDB.write(async () => {
await record.update(r => {
r.version = serverVersion;
if (serverInfo.supportedVersions?.timestamp && serverInfo.supportedVersions.timestamp > r.supportedVersions?.timestamp) {
r.supportedVersions = serverInfo.supportedVersions;
}
r.supportedVersions = serverInfo.supportedVersions;
});
});
return record;
Expand Down Expand Up @@ -128,7 +126,10 @@ const getServerInfo = function* getServerInfo({ server, raiseError = true }: { s
}

const serverRecord = yield* call(upsertServer, { server, serverInfo: serverInfoResult });
const isCompatible = yield* call(checkServerVersionCompatibility, serverRecord.supportedVersions, serverRecord.version);
const isCompatible = yield* call(checkServerVersionCompatibility, {
supportedVersion: serverRecord.supportedVersions,
serverVersion: serverRecord.version
});
if (!isCompatible) {
// if (raiseError) {
Alert.alert(I18n.t('Oops'), 'Nope');
Expand Down

0 comments on commit a0ef01d

Please sign in to comment.