diff --git a/keyserver/src/creators/thread-creator.js b/keyserver/src/creators/thread-creator.js --- a/keyserver/src/creators/thread-creator.js +++ b/keyserver/src/creators/thread-creator.js @@ -427,9 +427,8 @@ let editedSourceMessage = sourceMessage; if (sourceMessageID && sourceMessage.type === messageTypes.TEXT) { - const editMessageContent = await fetchLatestEditMessageContentByID( - sourceMessageID, - ); + const editMessageContent = + await fetchLatestEditMessageContentByID(sourceMessageID); if (editMessageContent) { editedSourceMessage = { ...sourceMessage, diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js --- a/keyserver/src/responders/website-responders.js +++ b/keyserver/src/responders/website-responders.js @@ -224,7 +224,7 @@ } const fontsURL = await getFontsURL(); res.end(html` - + @@ -245,8 +245,17 @@ } body { - font-family: 'Inter', -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + font-family: + 'Inter', + -apple-system, + 'Segoe UI', + 'Roboto', + 'Oxygen', + 'Ubuntu', + 'Cantarell', + 'Fira Sans', + 'Droid Sans', + 'Helvetica Neue', ui-sans-serif; background: #0a0a0a url('/images/invite_link_background.png') no-repeat; diff --git a/keyserver/src/socket/socket.js b/keyserver/src/socket/socket.js --- a/keyserver/src/socket/socket.js +++ b/keyserver/src/socket/socket.js @@ -233,9 +233,8 @@ ); await policiesValidator(viewer, baseLegalPolicies); - const serverResponses = await this.handleClientSocketMessage( - clientSocketMessage, - ); + const serverResponses = + await this.handleClientSocketMessage(clientSocketMessage); if (!this.redis) { this.redis = new RedisSubscriber( { userID: viewer.userID, sessionID: viewer.session }, diff --git a/lib/selectors/socket-selectors.js b/lib/selectors/socket-selectors.js --- a/lib/selectors/socket-selectors.js +++ b/lib/selectors/socket-selectors.js @@ -205,10 +205,10 @@ updatesCurrentAsOfSelector(keyserverID), currentCalendarQuery, ( - messagesCurrentAsOf: number, - updatesCurrentAsOf: number, - calendarQuery: (calendarActive: boolean) => CalendarQuery, - ) => + messagesCurrentAsOf: number, + updatesCurrentAsOf: number, + calendarQuery: (calendarActive: boolean) => CalendarQuery, + ) => (calendarActive: boolean): SessionState => ({ calendarQuery: calendarQuery(calendarActive), messagesCurrentAsOf, diff --git a/lib/shared/message-utils.js b/lib/shared/message-utils.js --- a/lib/shared/message-utils.js +++ b/lib/shared/message-utils.js @@ -162,15 +162,16 @@ ])(['desc', 'desc'])(messageInfos); } -const sortMessageIDs: (messages: { +[id: string]: RawMessageInfo }) => ( - messageIDs: $ReadOnlyArray, -) => string[] = messages => messageIDs => { - const lengths = findMessageIDMaxLengths(messageIDs); - return _orderBy([ - (id: string) => messages[id].time, - (id: string) => extendMessageID(id, lengths), - ])(['desc', 'desc'])(messageIDs); -}; +const sortMessageIDs: (messages: { + +[id: string]: RawMessageInfo, +}) => (messageIDs: $ReadOnlyArray) => string[] = + messages => messageIDs => { + const lengths = findMessageIDMaxLengths(messageIDs); + return _orderBy([ + (id: string) => messages[id].time, + (id: string) => extendMessageID(id, lengths), + ])(['desc', 'desc'])(messageIDs); + }; function rawMessageInfoFromMessageData( messageData: MessageData, diff --git a/lib/utils/call-server-endpoint.js b/lib/utils/call-server-endpoint.js --- a/lib/utils/call-server-endpoint.js +++ b/lib/utils/call-server-endpoint.js @@ -197,9 +197,8 @@ ? rest : { cookieInvalidated: false, currentUserInfo, ...rest }; if (clientSessionChange.cookieInvalidated) { - const maybeReplacement = await cookieInvalidationRecovery( - clientSessionChange, - ); + const maybeReplacement = + await cookieInvalidationRecovery(clientSessionChange); if (maybeReplacement) { return await maybeReplacement(endpoint, input, options); } diff --git a/lib/utils/ens-cache.test.js b/lib/utils/ens-cache.test.js --- a/lib/utils/ens-cache.test.js +++ b/lib/utils/ens-cache.test.js @@ -283,9 +283,8 @@ if (!process.env.ALCHEMY_API_KEY) { return; } - const ashoatAvatarResult = await ensCache.getAvatarURIForAddress( - ashoatAddr, - ); + const ashoatAvatarResult = + await ensCache.getAvatarURIForAddress(ashoatAddr); expect(ashoatAvatarResult).toBe(ashoatAvatar); }); it("should return ashoat.eth's avatar if in cache", async () => { @@ -301,9 +300,8 @@ return; } const timesGetAvatarCalledBefore = timesGetAvatarCalled; - const ashoatAvatarResult = await ensCache.getAvatarURIForAddress( - ashoatAddr, - ); + const ashoatAvatarResult = + await ensCache.getAvatarURIForAddress(ashoatAddr); expect(ashoatAvatarResult).toBe(ashoatAvatar); expect(timesGetAvatarCalled).toBe(timesGetAvatarCalledBefore); }); @@ -314,9 +312,8 @@ ensCache.clearCache(); const timesGetAvatarCalledBeforeSingleFetch = timesGetAvatarCalled; - const ashoatAvatarResult1 = await ensCache.getAvatarURIForAddress( - ashoatAddr, - ); + const ashoatAvatarResult1 = + await ensCache.getAvatarURIForAddress(ashoatAddr); expect(ashoatAvatarResult1).toBe(ashoatAvatar); const timesGetAvatarCalledForSingleFetch = timesGetAvatarCalled - timesGetAvatarCalledBeforeSingleFetch; @@ -340,18 +337,16 @@ if (!process.env.ALCHEMY_API_KEY) { return; } - const commalphaAvatarResult = await ensCache.getAvatarURIForAddress( - commalphaEthAddr, - ); + const commalphaAvatarResult = + await ensCache.getAvatarURIForAddress(commalphaEthAddr); expect(commalphaAvatarResult).toBe(commalphaEthAvatar); }); it("should return commbeta.eth's avatar, an eip155:1/erc721 URI pointing to an NFT with an SVG data URI", async () => { if (!process.env.ALCHEMY_API_KEY) { return; } - const commbetaAvatarResult = await ensCache.getAvatarURIForAddress( - commbetaEthAddr, - ); + const commbetaAvatarResult = + await ensCache.getAvatarURIForAddress(commbetaEthAddr); expect(commbetaAvatarResult).toBe(commbetaEthAvatar); }); }); diff --git a/lib/utils/message-ops-utils.js b/lib/utils/message-ops-utils.js --- a/lib/utils/message-ops-utils.js +++ b/lib/utils/message-ops-utils.js @@ -37,8 +37,8 @@ m.type === 'encrypted_photo' ? 'photo' : m.type === 'encrypted_video' - ? 'video' - : m.type; + ? 'video' + : m.type; const mediaURI = m.type === 'encrypted_photo' || m.type === 'encrypted_video' diff --git a/native/chat/thread-list-modal.react.js b/native/chat/thread-list-modal.react.js --- a/native/chat/thread-list-modal.react.js +++ b/native/chat/thread-list-modal.react.js @@ -35,11 +35,9 @@ type Props = { +threadInfo: ThreadInfo, - +createRenderItem: (onPressItem: (threadInfo: ThreadInfo) => void) => (row: { - +item: U, - +index: number, - ... - }) => React.Node, + +createRenderItem: ( + onPressItem: (threadInfo: ThreadInfo) => void, + ) => (row: { +item: U, +index: number, ... }) => React.Node, +listData: $ReadOnlyArray, +searchState: ThreadSearchState, +setSearchState: SetState, diff --git a/native/media/file-utils.js b/native/media/file-utils.js --- a/native/media/file-utils.js +++ b/native/media/file-utils.js @@ -104,9 +104,8 @@ return null; } const { localURI } = localURIResult; - const { steps: fileSizeSteps, result: fileSize } = await fetchFileSize( - localURI, - ); + const { steps: fileSizeSteps, result: fileSize } = + await fetchFileSize(localURI); steps.push(...fileSizeSteps); return fileSize; })(); diff --git a/native/media/save-media.js b/native/media/save-media.js --- a/native/media/save-media.js +++ b/native/media/save-media.js @@ -352,9 +352,8 @@ ): Promise { const steps: Array = []; - const { result: fetchBlobResult, steps: fetchBlobSteps } = await fetchBlob( - inputURI, - ); + const { result: fetchBlobResult, steps: fetchBlobSteps } = + await fetchBlob(inputURI); steps.push(...fetchBlobSteps); if (!fetchBlobResult.success) { return { result: fetchBlobResult, steps }; diff --git a/native/navigation/nav-selectors.js b/native/navigation/nav-selectors.js --- a/native/navigation/nav-selectors.js +++ b/native/navigation/nav-selectors.js @@ -248,9 +248,9 @@ (input: NavPlusRedux) => currentCalendarQuery(input.redux), (input: NavPlusRedux) => calendarActiveSelector(input.navContext), ( - calendarQuery: (calendarActive: boolean) => CalendarQuery, - calendarActive: boolean, - ) => + calendarQuery: (calendarActive: boolean) => CalendarQuery, + calendarActive: boolean, + ) => () => calendarQuery(calendarActive), ); diff --git a/native/profile/relationship-list.react.js b/native/profile/relationship-list.react.js --- a/native/profile/relationship-list.react.js +++ b/native/profile/relationship-list.react.js @@ -101,7 +101,7 @@ userRelationshipStatus.BOTH_BLOCKED, ], [BlockListRouteName]: [], - }[routeName]), + })[routeName], [routeName], ); diff --git a/native/selectors/message-selectors.js b/native/selectors/message-selectors.js --- a/native/selectors/message-selectors.js +++ b/native/selectors/message-selectors.js @@ -43,10 +43,10 @@ (input: NavPlusRedux) => input.redux.messageStore.threads, (input: NavPlusRedux) => activeThreadSelector(input.navContext), ( - threadActivityStore: ThreadActivityStore, - threadMessageInfos: { +[id: string]: ThreadMessageInfo }, - activeThread: ?string, - ) => + threadActivityStore: ThreadActivityStore, + threadMessageInfos: { +[id: string]: ThreadMessageInfo }, + activeThread: ?string, + ) => (): $ReadOnlyArray => { const now = Date.now(); const threadIDsToPrune = []; diff --git a/native/selectors/socket-selectors.js b/native/selectors/socket-selectors.js --- a/native/selectors/socket-selectors.js +++ b/native/selectors/socket-selectors.js @@ -103,16 +103,16 @@ (input: NativeGetClientResponsesSelectorInputType) => input.getInitialNotificationsEncryptedMessage, ( - getClientResponsesFunc: ( - calendarActive: boolean, - oneTimeKeyGenerator: ?OneTimeKeyGenerator, - getSignedIdentityKeysBlob: () => Promise, - getInitialNotificationsEncryptedMessage: ?() => Promise, - serverRequests: $ReadOnlyArray, - ) => Promise<$ReadOnlyArray>, + getClientResponsesFunc: ( calendarActive: boolean, - getInitialNotificationsEncryptedMessage: () => Promise, - ) => + oneTimeKeyGenerator: ?OneTimeKeyGenerator, + getSignedIdentityKeysBlob: () => Promise, + getInitialNotificationsEncryptedMessage: ?() => Promise, + serverRequests: $ReadOnlyArray, + ) => Promise<$ReadOnlyArray>, + calendarActive: boolean, + getInitialNotificationsEncryptedMessage: () => Promise, + ) => (serverRequests: $ReadOnlyArray) => getClientResponsesFunc( calendarActive, @@ -130,9 +130,9 @@ (input: NavPlusRedux) => sessionStateFuncSelector(keyserverID)(input.redux), (input: NavPlusRedux) => calendarActiveSelector(input.navContext), ( - sessionStateFunc: (calendarActive: boolean) => SessionState, - calendarActive: boolean, - ) => + sessionStateFunc: (calendarActive: boolean) => SessionState, + calendarActive: boolean, + ) => () => sessionStateFunc(calendarActive), ); diff --git a/web/database/worker/db-worker.js b/web/database/worker/db-worker.js --- a/web/database/worker/db-worker.js +++ b/web/database/worker/db-worker.js @@ -75,9 +75,8 @@ } } - const encryptedContent = await localforage.getItem( - SQLITE_CONTENT, - ); + const encryptedContent = + await localforage.getItem(SQLITE_CONTENT); let dbContent = null; try { diff --git a/web/push-notif/notif-crypto-utils.js b/web/push-notif/notif-crypto-utils.js --- a/web/push-notif/notif-crypto-utils.js +++ b/web/push-notif/notif-crypto-utils.js @@ -271,9 +271,8 @@ } // Safari doesn't support structured clone algorithm in service // worker context so we have to store CryptoKey as JSON - const persistedCryptoKey = await localforage.getItem( - encryptionKeyDBLabel, - ); + const persistedCryptoKey = + await localforage.getItem(encryptionKeyDBLabel); if (!persistedCryptoKey) { return null; } diff --git a/web/selectors/account-selectors.js b/web/selectors/account-selectors.js --- a/web/selectors/account-selectors.js +++ b/web/selectors/account-selectors.js @@ -12,9 +12,9 @@ logInExtraInfoSelector, (state: AppState) => state.navInfo.tab === 'calendar', ( - logInExtraInfoFunc: (calendarActive: boolean) => LogInExtraInfo, - calendarActive: boolean, - ) => + logInExtraInfoFunc: (calendarActive: boolean) => LogInExtraInfo, + calendarActive: boolean, + ) => () => logInExtraInfoFunc(calendarActive), ); diff --git a/web/selectors/nav-selectors.js b/web/selectors/nav-selectors.js --- a/web/selectors/nav-selectors.js +++ b/web/selectors/nav-selectors.js @@ -91,9 +91,9 @@ currentCalendarQuery, (state: AppState) => state.navInfo.tab === 'calendar', ( - calendarQuery: (calendarActive: boolean) => CalendarQuery, - calendarActive: boolean, - ) => + calendarQuery: (calendarActive: boolean) => CalendarQuery, + calendarActive: boolean, + ) => () => calendarQuery(calendarActive), ); diff --git a/web/selectors/socket-selectors.js b/web/selectors/socket-selectors.js --- a/web/selectors/socket-selectors.js +++ b/web/selectors/socket-selectors.js @@ -78,17 +78,17 @@ (input: WebGetClientResponsesSelectorInputType) => input.getInitialNotificationsEncryptedMessage, ( - getClientResponsesFunc: ( - calendarActive: boolean, - oneTimeKeyGenerator: ?OneTimeKeyGenerator, - getSignedIdentityKeysBlob: () => Promise, - getInitialNotificationsEncryptedMessage: () => Promise, - serverRequests: $ReadOnlyArray, - ) => Promise<$ReadOnlyArray>, - getSignedIdentityKeysBlob: () => Promise, + getClientResponsesFunc: ( calendarActive: boolean, + oneTimeKeyGenerator: ?OneTimeKeyGenerator, + getSignedIdentityKeysBlob: () => Promise, getInitialNotificationsEncryptedMessage: () => Promise, - ) => + serverRequests: $ReadOnlyArray, + ) => Promise<$ReadOnlyArray>, + getSignedIdentityKeysBlob: () => Promise, + calendarActive: boolean, + getInitialNotificationsEncryptedMessage: () => Promise, + ) => (serverRequests: $ReadOnlyArray) => getClientResponsesFunc( calendarActive, @@ -106,9 +106,9 @@ sessionStateFuncSelector(keyserverID), (state: AppState) => state.navInfo.tab === 'calendar', ( - sessionStateFunc: (calendarActive: boolean) => SessionState, - calendarActive: boolean, - ) => + sessionStateFunc: (calendarActive: boolean) => SessionState, + calendarActive: boolean, + ) => () => sessionStateFunc(calendarActive), );