Changeset View
Changeset View
Standalone View
Standalone View
keyserver/src/socket/session-utils.js
// @flow | // @flow | ||||
import invariant from 'invariant'; | import invariant from 'invariant'; | ||||
import t from 'tcomb'; | import t from 'tcomb'; | ||||
import type { TUnion, TInterface } from 'tcomb'; | import type { TUnion } from 'tcomb'; | ||||
import { | import { | ||||
usersInRawEntryInfos, | usersInRawEntryInfos, | ||||
serverEntryInfo, | serverEntryInfo, | ||||
serverEntryInfosObject, | serverEntryInfosObject, | ||||
} from 'lib/shared/entry-utils.js'; | } from 'lib/shared/entry-utils.js'; | ||||
import { usersInThreadInfo } from 'lib/shared/thread-utils.js'; | import { usersInThreadInfo } from 'lib/shared/thread-utils.js'; | ||||
import { hasMinCodeVersion } from 'lib/shared/version-utils.js'; | import { hasMinCodeVersion } from 'lib/shared/version-utils.js'; | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | import { | ||||
setCookieSignedIdentityKeysBlob, | setCookieSignedIdentityKeysBlob, | ||||
} from '../session/cookies.js'; | } from '../session/cookies.js'; | ||||
import type { Viewer } from '../session/viewer.js'; | import type { Viewer } from '../session/viewer.js'; | ||||
import { activityUpdater } from '../updaters/activity-updaters.js'; | import { activityUpdater } from '../updaters/activity-updaters.js'; | ||||
import { compareNewCalendarQuery } from '../updaters/entry-updaters.js'; | import { compareNewCalendarQuery } from '../updaters/entry-updaters.js'; | ||||
import type { SessionUpdate } from '../updaters/session-updaters.js'; | import type { SessionUpdate } from '../updaters/session-updaters.js'; | ||||
import { getOlmUtility } from '../utils/olm-utils.js'; | import { getOlmUtility } from '../utils/olm-utils.js'; | ||||
const clientResponseInputValidator: TUnion<TInterface> = t.union([ | const clientResponseInputValidator: TUnion<ClientResponse> = t.union([ | ||||
tShape({ | tShape({ | ||||
type: t.irreducible( | type: t.irreducible( | ||||
'serverRequestTypes.PLATFORM', | 'serverRequestTypes.PLATFORM', | ||||
x => x === serverRequestTypes.PLATFORM, | x => x === serverRequestTypes.PLATFORM, | ||||
), | ), | ||||
platform: tPlatform, | platform: tPlatform, | ||||
}), | }), | ||||
tShape({ | tShape({ | ||||
▲ Show 20 Lines • Show All 516 Lines • Show Last 20 Lines |