Fix typos via codespell

This commit is contained in:
mdPlusPlus 2023-02-16 01:02:45 +01:00
parent 8202abe12b
commit 1d6ed17ac7
41 changed files with 49 additions and 49 deletions

View file

@ -65,7 +65,7 @@ git lfs install
nvm install # install the current node version used in this project nvm install # install the current node version used in this project
nvm use # use the current node version used in this project nvm use # use the current node version used in this project
npm install -g yarn # install yarn globally for this node version npm install -g yarn # install yarn globally for this node version
yarn install --frozen-lockfile # install all dependecies of this project yarn install --frozen-lockfile # install all dependencies of this project
yarn build-everything # transpile and assemble files yarn build-everything # transpile and assemble files
yarn start-prod # start the app on production mode (currently this is the only one supported) yarn start-prod # start the app on production mode (currently this is the only one supported)
``` ```
@ -115,7 +115,7 @@ git lfs install # once git lfs is installed, you have to run this command too
nvm install # install the current node version used in this project nvm install # install the current node version used in this project
nvm use # use the current node version used in this project nvm use # use the current node version used in this project
npm install -g yarn # install yarn globally for this node version npm install -g yarn # install yarn globally for this node version
yarn install --frozen-lockfile # install all dependecies of this project yarn install --frozen-lockfile # install all dependencies of this project
yarn build-everything # transpile and assemble files yarn build-everything # transpile and assemble files
yarn start-prod # start the app on production mode (currently this is the only one supported) yarn start-prod # start the app on production mode (currently this is the only one supported)
``` ```

View file

@ -102,7 +102,7 @@ For example, running:
NODE_APP_INSTANCE=alice yarn start-prod NODE_APP_INSTANCE=alice yarn start-prod
``` ```
Will run the development environment with the `alice` instance and thus create a seperate storage profile. Will run the development environment with the `alice` instance and thus create a separate storage profile.
If a fixed profile is needed (in the case of tests), you can specify it using `storageProfile` in the config file. If the change is local then put it in `local-{instance}.json` otherwise put it in `default-{instance}.json` or `{env}-{instance}.json`. If a fixed profile is needed (in the case of tests), you can specify it using `storageProfile` in the config file. If the change is local then put it in `local-{instance}.json` otherwise put it in `default-{instance}.json` or `{env}-{instance}.json`.

View file

@ -32,7 +32,7 @@ import { ExpirationTimerOptions } from '../util/expiringMessages';
import moment from 'moment'; import moment from 'moment';
import styled from 'styled-components'; import styled from 'styled-components';
// Default to the locale from env. It will be overriden if moment // Default to the locale from env. It will be overridden if moment
// does not recognize it with what moment knows which is the closest. // does not recognize it with what moment knows which is the closest.
// i.e. es-419 will return 'es'. // i.e. es-419 will return 'es'.
// We just need to use what we got from moment in getLocale on the updateLocale below // We just need to use what we got from moment in getLocale on the updateLocale below

View file

@ -17,7 +17,7 @@ const sha512FromPubkey = async (pubkey: string): Promise<string> => {
.join(''); .join('');
}; };
// do not do this on every avatar, just cache the values so we can reuse them accross the app // do not do this on every avatar, just cache the values so we can reuse them across the app
// key is the pubkey, value is the hash // key is the pubkey, value is the hash
const cachedHashes = new Map<string, number>(); const cachedHashes = new Map<string, number>();

View file

@ -3,7 +3,7 @@ import { SessionIcon, SessionIconType } from '../icon';
import { SessionDropdownItem, SessionDropDownItemType } from './SessionDropdownItem'; import { SessionDropdownItem, SessionDropDownItemType } from './SessionDropdownItem';
// THIS IS DROPDOWN ACCORDIAN STYLE OPTIONS SELECTOR ELEMENT, NOT A CONTEXTMENU // THIS IS DROPDOWN ACCORDION STYLE OPTIONS SELECTOR ELEMENT, NOT A CONTEXTMENU
type Props = { type Props = {
label: string; label: string;

View file

@ -92,7 +92,7 @@ export const SessionInput = (props: Props) => {
data-testid={inputDataTestId} data-testid={inputDataTestId}
onChange={updateInputValue} onChange={updateInputValue}
className={classNames(enableShowHide ? 'session-input-floating-label-show-hide' : '')} className={classNames(enableShowHide ? 'session-input-floating-label-show-hide' : '')}
// just incase onChange isn't triggered // just in case onChange isn't triggered
onBlur={updateInputValue} onBlur={updateInputValue}
onKeyPress={event => { onKeyPress={event => {
if (event.key === 'Enter' && props.onEnterPressed) { if (event.key === 'Enter' && props.onEnterPressed) {

View file

@ -707,7 +707,7 @@ class CompositionBoxInner extends React.Component<Props, State> {
// than the message was sent without the link preview. // than the message was sent without the link preview.
// So be sure to reset the staged link preview so it is not sent with the next message. // So be sure to reset the staged link preview so it is not sent with the next message.
// if we were not aborted, it's probably just an error on the fetch. Nothing to do excpet mark the fetch as done (with errors) // if we were not aborted, it's probably just an error on the fetch. Nothing to do except mark the fetch as done (with errors)
if (aborted) { if (aborted) {
this.setState({ this.setState({

View file

@ -12,7 +12,7 @@ export const MINIMUM_LINK_PREVIEW_IMAGE_WIDTH = THUMBNAIL_SIDE;
type Props = { type Props = {
messageId: string; messageId: string;
isDetailView?: boolean; // when the detail is shown for a message, we disble click and some other stuff isDetailView?: boolean; // when the detail is shown for a message, we disable click and some other stuff
}; };
export const Message = (props: Props) => { export const Message = (props: Props) => {

View file

@ -22,7 +22,7 @@ const StyledConversationTitleResults = styled.div`
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
color: var(--conversation-tab-text-color); color: var(--conversation-tab-text-color);
/* We don't want this to overflow horziontally past the timestamp */ /* We don't want this to overflow horizontally past the timestamp */
width: 90px; width: 90px;
`; `;

View file

@ -351,7 +351,7 @@ export async function deleteMessagesByIdForEveryone(
onClickOk: async () => { onClickOk: async () => {
await doDeleteSelectedMessages({ selectedMessages, conversation, deleteForEveryone: true }); await doDeleteSelectedMessages({ selectedMessages, conversation, deleteForEveryone: true });
// explicity close modal for this case. // explicitly close modal for this case.
window.inboxStore?.dispatch(updateConfirmModal(null)); window.inboxStore?.dispatch(updateConfirmModal(null));
return; return;
}, },

View file

@ -649,7 +649,7 @@ async function showDebugLogWindow() {
} }
if (!mainWindow) { if (!mainWindow) {
console.info('debug log neeeds mainwindow size to open'); console.info('debug log needs mainwindow size to open');
return; return;
} }

View file

@ -24,7 +24,7 @@ if (environment === 'production') {
process.env.ALLOW_CONFIG_MUTATIONS = ''; process.env.ALLOW_CONFIG_MUTATIONS = '';
process.env.SUPPRESS_NO_CONFIG_WARNING = ''; process.env.SUPPRESS_NO_CONFIG_WARNING = '';
// We could be running againt production but still be in dev mode, we need to handle that // We could be running against production but still be in dev mode, we need to handle that
if (!electronIsDev) { if (!electronIsDev) {
process.env.NODE_APP_INSTANCE = ''; process.env.NODE_APP_INSTANCE = '';
} }

View file

@ -15,7 +15,7 @@ const { NODE_ENV: environment, NODE_APP_INSTANCE: instance } = process.env;
const isValidInstance = typeof instance === 'string' && instance.length > 0; const isValidInstance = typeof instance === 'string' && instance.length > 0;
const isProduction = environment === 'production' && !isValidInstance; const isProduction = environment === 'production' && !isValidInstance;
// Use seperate data directories for each different environment and app instances // Use separate data directories for each different environment and app instances
if (!isProduction) { if (!isProduction) {
storageProfile = environment; storageProfile = environment;
if (isValidInstance) { if (isValidInstance) {

View file

@ -598,7 +598,7 @@ function updateToSessionSchemaVersion20(currentVersion: number, db: BetterSqlite
// obj.profile.displayName is the display as this user set it. // obj.profile.displayName is the display as this user set it.
if (obj?.nickname?.length && obj?.profile?.displayName?.length) { if (obj?.nickname?.length && obj?.profile?.displayName?.length) {
// this one has a nickname set, but name is unset, set it to the displayName in the lokiProfile if it's exisitng // this one has a nickname set, but name is unset, set it to the displayName in the lokiProfile if it's existing
obj.name = obj.profile.displayName; obj.name = obj.profile.displayName;
sqlNode.saveConversation(obj as ConversationAttributes, db); sqlNode.saveConversation(obj as ConversationAttributes, db);
} }

View file

@ -2147,7 +2147,7 @@ function cleanUpOldOpengroupsOnStart() {
let pruneSetting = getItemById(SettingsKey.settingsOpengroupPruning)?.value; let pruneSetting = getItemById(SettingsKey.settingsOpengroupPruning)?.value;
if (pruneSetting === undefined) { if (pruneSetting === undefined) {
console.info('Prune settings is undefined (and not explicitely false), forcing it to true.'); console.info('Prune settings is undefined (and not explicitly false), forcing it to true.');
createOrUpdateItem({ id: SettingsKey.settingsOpengroupPruning, value: true }); createOrUpdateItem({ id: SettingsKey.settingsOpengroupPruning, value: true });
pruneSetting = true; pruneSetting = true;
} }

View file

@ -174,7 +174,7 @@ const handleContactFromConfig = async (
} }
} }
// only set for explicit true/false values incase outdated sender doesn't have the fields // only set for explicit true/false values in case outdated sender doesn't have the fields
if (contactReceived.isBlocked === true) { if (contactReceived.isBlocked === true) {
if (contactConvo.isIncomingRequest()) { if (contactConvo.isIncomingRequest()) {
// handling case where restored device's declined message requests were getting restored // handling case where restored device's declined message requests were getting restored

View file

@ -391,7 +391,7 @@ export async function handleMessageJob(
void queueAttachmentDownloads(messageModel, conversation); void queueAttachmentDownloads(messageModel, conversation);
// Check if we need to update any profile names // Check if we need to update any profile names
// the only profile we don't update with what is coming here is ours, // the only profile we don't update with what is coming here is ours,
// as our profile is shared accross our devices with a ConfigurationMessage // as our profile is shared across our devices with a ConfigurationMessage
if (messageModel.isIncoming() && regularDataMessage.profile) { if (messageModel.isIncoming() && regularDataMessage.profile) {
void appendFetchAvatarAndProfileJob( void appendFetchAvatarAndProfileJob(
sendingDeviceConversation, sendingDeviceConversation,
@ -400,7 +400,7 @@ export async function handleMessageJob(
); );
} }
// even with all the warnings, I am very sus about if this is usefull or not // even with all the warnings, I am very sus about if this is useful or not
// try { // try {
// // We go to the database here because, between the message save above and // // We go to the database here because, between the message save above and
// // the previous line's trigger() call, we might have marked all messages // // the previous line's trigger() call, we might have marked all messages

View file

@ -22,7 +22,7 @@ export type OpenGroupRequestHeaders = {
* @param endpoint endpoint of request we're making * @param endpoint endpoint of request we're making
* @param method method of request we're making * @param method method of request we're making
* @param blinded is the server being requested to blinded or not * @param blinded is the server being requested to blinded or not
* @param body the body of the request we're mkaing * @param body the body of the request we're making
* @returns object of headers, including X-SOGS and other headers. * @returns object of headers, including X-SOGS and other headers.
*/ */
const getOurOpenGroupHeaders = async ( const getOurOpenGroupHeaders = async (

View file

@ -330,7 +330,7 @@ const makeBatchRequestPayload = (
}; };
/** /**
* Get the request to get all of the details we care from an opengroup, accross all rooms. * Get the request to get all of the details we care from an opengroup, across all rooms.
* Only compatible with v4 onion requests. * Only compatible with v4 onion requests.
* *
* if isSequence is set to true, each rows will be run in order until the first one fails * if isSequence is set to true, each rows will be run in order until the first one fails

View file

@ -567,7 +567,7 @@ export async function retrieveNextMessages(
} }
/** /**
* Makes a post to a node to receive the timestamp info. If non-existant, returns -1 * Makes a post to a node to receive the timestamp info. If non-existent, returns -1
* @param snode Snode to send request to * @param snode Snode to send request to
* @returns timestamp of the response from snode * @returns timestamp of the response from snode
*/ */

View file

@ -727,7 +727,7 @@ async function handle421InvalidSwarm({
associatedWith, associatedWith,
}); });
// this is important we throw so another retry is made and we exit the handling of that reponse // this is important we throw so another retry is made and we exit the handling of that response
throw new pRetry.AbortError(ERROR_421_HANDLED_RETRY_REQUEST); throw new pRetry.AbortError(ERROR_421_HANDLED_RETRY_REQUEST);
} }

View file

@ -260,7 +260,7 @@ async function dropPathStartingWithGuardNode(guardNodeEd25519: string) {
guardNodes = guardNodes.filter(g => g.pubkey_ed25519 !== guardNodeEd25519); guardNodes = guardNodes.filter(g => g.pubkey_ed25519 !== guardNodeEd25519);
// write the updates guard nodes to the db. // write the updates guard nodes to the db.
await internalUpdateGuardNodes(guardNodes); await internalUpdateGuardNodes(guardNodes);
// we are dropping it. Reset the counter in case this same guard gets choosen later // we are dropping it. Reset the counter in case this same guard gets chosen later
pathFailureCount[guardNodeEd25519] = 0; pathFailureCount[guardNodeEd25519] = 0;
// trigger path rebuilding for the dropped path. This will throw if anything happens // trigger path rebuilding for the dropped path. This will throw if anything happens
@ -516,7 +516,7 @@ async function buildNewOnionPathsWorker() {
minTimeout: 1000, minTimeout: 1000,
onFailedAttempt: e => { onFailedAttempt: e => {
window?.log?.warn( window?.log?.warn(
`buildNewOnionPathsWorker attemp #${e.attemptNumber} failed. ${e.retriesLeft} retries left... Error: ${e.message}` `buildNewOnionPathsWorker attempt #${e.attemptNumber} failed. ${e.retriesLeft} retries left... Error: ${e.message}`
); );
}, },
} }

View file

@ -175,7 +175,7 @@ async function handleMessageSentFailure(
/** /**
* This function tries to find a message by messageId by first looking on the MessageController. * This function tries to find a message by messageId by first looking on the MessageController.
* The MessageController holds all messages being in memory. * The MessageController holds all messages being in memory.
* Those are the messages sent recently, recieved recently, or the one shown to the user. * Those are the messages sent recently, received recently, or the one shown to the user.
* *
* If the app restarted, it's very likely those messages won't be on the memory anymore. * If the app restarted, it's very likely those messages won't be on the memory anymore.
* In this case, this function will look for it in the database and return it. * In this case, this function will look for it in the database and return it.

View file

@ -236,7 +236,7 @@ async function _runJob(job: any) {
// so there is no need to continue trying to download it. // so there is no need to continue trying to download it.
if (currentAttempt >= 3 || was404Error(error)) { if (currentAttempt >= 3 || was404Error(error)) {
logger.error( logger.error(
`_runJob: ${currentAttempt} failed attempts, marking attachment ${id} from message ${found?.idForLogging()} as permament error:`, `_runJob: ${currentAttempt} failed attempts, marking attachment ${id} from message ${found?.idForLogging()} as permanent error:`,
error && error.stack ? error.stack : error error && error.stack ? error.stack : error
); );

View file

@ -166,7 +166,7 @@ export async function poll(
} }
/** /**
* Creates a promise which waits until `check` returns `true` or rejects if `timeout` preiod is reached. * Creates a promise which waits until `check` returns `true` or rejects if `timeout` period is reached.
* If `timeout` is reached then this will throw an Error. * If `timeout` is reached then this will throw an Error.
* *
* @param check The boolean check. * @param check The boolean check.

View file

@ -26,7 +26,7 @@ export function combineKeys(
// //
// BLAKE2b(a kB || kA || kB) // BLAKE2b(a kB || kA || kB)
// //
// The receiver can calulate the same value via: // The receiver can calculate the same value via:
// //
// BLAKE2b(b kA || kA || kB) // BLAKE2b(b kA || kA || kB)
export function sharedBlindedEncryptionKey({ export function sharedBlindedEncryptionKey({

View file

@ -509,7 +509,7 @@ export async function USER_callRecipient(recipient: string) {
callNotificationType: 'started-call', callNotificationType: 'started-call',
}); });
// initiating a call is analgous to sending a message request // initiating a call is analogous to sending a message request
await approveConvoAndSendResponse(recipient, true); await approveConvoAndSendResponse(recipient, true);
// we do it manually as the sendToPubkeyNonDurably rely on having a message saved to the db for MessageSentSuccess // we do it manually as the sendToPubkeyNonDurably rely on having a message saved to the db for MessageSentSuccess
@ -521,7 +521,7 @@ export async function USER_callRecipient(recipient: string) {
await openMediaDevicesAndAddTracks(); await openMediaDevicesAndAddTracks();
await createOfferAndSendIt(recipient); await createOfferAndSendIt(recipient);
// close and end the call if callTimeoutMs is reached ans still not connected // close and end the call if callTimeoutMs is reached and still not connected
global.setTimeout(async () => { global.setTimeout(async () => {
if (justCreatedCallUUID === currentCallUUID && getIsRinging()) { if (justCreatedCallUUID === currentCallUUID && getIsRinging()) {
window.log.info( window.log.info(
@ -751,7 +751,7 @@ function createOrGetPeerConnection(withPubkey: string) {
); );
if (peerConnection && peerConnection?.iceConnectionState === 'disconnected') { if (peerConnection && peerConnection?.iceConnectionState === 'disconnected') {
//this will trigger a negotation event with iceRestart set to true in the createOffer options set //this will trigger a negotiation event with iceRestart set to true in the createOffer options set
global.setTimeout(async () => { global.setTimeout(async () => {
window.log.info('onconnectionstatechange disconnected: restartIce()'); window.log.info('onconnectionstatechange disconnected: restartIce()');

View file

@ -301,7 +301,7 @@ export type ConversationsStateType = {
* Saving it here, make it possible to restore the position of the user before the refresh by pointing * Saving it here, make it possible to restore the position of the user before the refresh by pointing
* at that same messageId and aligning the list to the top. * at that same messageId and aligning the list to the top.
* *
* Once the view scrolled, this value is reseted by resetOldTopMessageId * Once the view scrolled, this value is reset by resetOldTopMessageId
*/ */
oldTopMessageId: string | null; oldTopMessageId: string | null;
@ -310,7 +310,7 @@ export type ConversationsStateType = {
* Saving it here, make it possible to restore the position of the user before the refresh by pointing * Saving it here, make it possible to restore the position of the user before the refresh by pointing
* at that same messageId and aligning the list to the bottom. * at that same messageId and aligning the list to the bottom.
* *
* Once the view scrolled, this value is reseted by resetOldBottomMessageId * Once the view scrolled, this value is reset by resetOldBottomMessageId
*/ */
oldBottomMessageId: string | null; oldBottomMessageId: string | null;

View file

@ -467,7 +467,7 @@ const decryptBlindedMessage = async (
if (plaintextIncoming.length <= 32) { if (plaintextIncoming.length <= 32) {
// throw Error; // throw Error;
window?.log?.error('decryptBlindedMessage: plaintext unsufficient length'); window?.log?.error('decryptBlindedMessage: plaintext insufficient length');
return; return;
} }

View file

@ -94,7 +94,7 @@ describe('OnionPathsErrors', () => {
stubData('getSwarmNodesForPubkey').resolves(fakeSwarmForAssociatedWith); stubData('getSwarmNodesForPubkey').resolves(fakeSwarmForAssociatedWith);
updateGuardNodesStub = stubData('updateGuardNodes').resolves(); updateGuardNodesStub = stubData('updateGuardNodes').resolves();
// those are still doing what they do, but we spy on their executation // those are still doing what they do, but we spy on their execution
updateSwarmSpy = stubData('updateSwarmNodesForPubkey').resolves(); updateSwarmSpy = stubData('updateSwarmNodesForPubkey').resolves();
stubData('getItemById').resolves({ id: SNODE_POOL_ITEM_ID, value: '' }); stubData('getItemById').resolves({ id: SNODE_POOL_ITEM_ID, value: '' });
stubData('createOrUpdateItem').resolves(); stubData('createOrUpdateItem').resolves();

View file

@ -53,7 +53,7 @@ describe('Padding', () => {
}); });
it('add padding if the attachment is already too big', () => { it('add padding if the attachment is already too big', () => {
// we just want to make sure we do not overide attachment data. The file upload will fail, but at least make sure to keep the user data. // we just want to make sure we do not override attachment data. The file upload will fail, but at least make sure to keep the user data.
const bufferIn = new Uint8Array(MAX_ATTACHMENT_FILESIZE_BYTES + 1); const bufferIn = new Uint8Array(MAX_ATTACHMENT_FILESIZE_BYTES + 1);
const paddedBuffer = addAttachmentPadding(bufferIn); const paddedBuffer = addAttachmentPadding(bufferIn);
const expectedPaddedSize = Math.floor( const expectedPaddedSize = Math.floor(

View file

@ -145,7 +145,7 @@ describe('MessageSender', () => {
expect(decodedTimestampFromSending).to.be.above(expectedTimestamp - 10); expect(decodedTimestampFromSending).to.be.above(expectedTimestamp - 10);
expect(decodedTimestampFromSending).to.be.below(expectedTimestamp + 10); expect(decodedTimestampFromSending).to.be.below(expectedTimestamp + 10);
// then make sure the plaintextBuffer was overriden too // then make sure the plaintextBuffer was overridden too
const visibleMessageExpected = TestUtils.generateVisibleMessage({ const visibleMessageExpected = TestUtils.generateVisibleMessage({
timestamp: decodedTimestampFromSending, timestamp: decodedTimestampFromSending,
}); });

View file

@ -311,7 +311,7 @@ describe('mutationCache', () => {
server: roomInfos.serverUrl, server: roomInfos.serverUrl,
room: roomInfos.roomId, room: roomInfos.roomId,
changeType: ChangeType.REACTIONS, changeType: ChangeType.REACTIONS,
seqno: 300, // greater than response messageResponse seqno should be procesed seqno: 300, // greater than response messageResponse seqno should be processed
metadata: { metadata: {
messageId: originalMessage.serverId, messageId: originalMessage.serverId,
emoji: '😄', emoji: '😄',
@ -322,7 +322,7 @@ describe('mutationCache', () => {
server: roomInfos.serverUrl, server: roomInfos.serverUrl,
room: roomInfos.roomId, room: roomInfos.roomId,
changeType: ChangeType.REACTIONS, changeType: ChangeType.REACTIONS,
seqno: 301, //// greater than response messageResponse seqno should be procesed seqno: 301, //// greater than response messageResponse seqno should be processed
metadata: { metadata: {
messageId: originalMessage.serverId, messageId: originalMessage.serverId,
emoji: '😈', emoji: '😈',

View file

@ -95,13 +95,13 @@ describe('knownBlindedKeys', () => {
describe('writeKnownBlindedKeys', () => { describe('writeKnownBlindedKeys', () => {
it('writeKnownBlindedKeys with null', async () => { it('writeKnownBlindedKeys with null', async () => {
// the cached blinded keys is resetted on each test, so that first one we try to write null // the cached blinded keys is reset on each test, so that first one we try to write null
await writeKnownBlindedKeys(); await writeKnownBlindedKeys();
expect(createOrUpdateItem.notCalled).to.be.true; expect(createOrUpdateItem.notCalled).to.be.true;
}); });
it('writeKnownBlindedKeys with null but loaded', async () => { it('writeKnownBlindedKeys with null but loaded', async () => {
// the cached blinded keys is resetted on each test, so that first one we try to write null // the cached blinded keys is reset on each test, so that first one we try to write null
getItemById.resolves(null); getItemById.resolves(null);
await loadKnownBlindedKeys(); await loadKnownBlindedKeys();

View file

@ -42,7 +42,7 @@ describe('JobQueue', () => {
const start = Date.now(); const start = Date.now();
await assert.eventually.deepEqual(Promise.all(input.map(mapper)), [10, 20, 30]); await assert.eventually.deepEqual(Promise.all(input.map(mapper)), [10, 20, 30]);
const timeTaken = Date.now() - start; const timeTaken = Date.now() - start;
assert.isAtLeast(timeTaken, 20, 'Queue should take atleast 100ms to run.'); assert.isAtLeast(timeTaken, 20, 'Queue should take at least 100ms to run.');
}); });
it('should return the result of the job', async () => { it('should return the result of the job', async () => {

View file

@ -1,7 +1,7 @@
import { hexColorToRGB } from '../util/hexColorToRGB'; import { hexColorToRGB } from '../util/hexColorToRGB';
import { COLORS } from './constants/colors'; import { COLORS } from './constants/colors';
// These variables are independant of the current theme // These variables are independent of the current theme
export type ThemeGlobals = { export type ThemeGlobals = {
/* Fonts */ /* Fonts */
'--font-default': string; '--font-default': string;

View file

@ -117,7 +117,7 @@ export interface Reaction {
action: Action; action: Action;
} }
// used for logic operations with reactions i.e reponses, db, etc. // used for logic operations with reactions i.e responses, db, etc.
export type ReactionList = Record< export type ReactionList = Record<
string, string,
{ {

View file

@ -30,7 +30,7 @@ export class BlockedNumberController {
/** /**
* Check if a device is blocked synchronously. * Check if a device is blocked synchronously.
* This will only check against the memory cache on if a device is blocked, it is reccomended to pass in the primary device pub key. * This will only check against the memory cache on if a device is blocked, it is recommended to pass in the primary device pub key.
* *
* Make sure `load()` has been called before this function so that the correct blocked state is returned. * Make sure `load()` has been called before this function so that the correct blocked state is returned.
* *

View file

@ -20,7 +20,7 @@ export async function destroyMessagesAndUpdateRedux(
const conversationWithChanges = uniq(messages.map(m => m.conversationKey)); const conversationWithChanges = uniq(messages.map(m => m.conversationKey));
try { try {
// Delete all thoses messages in a single sql call // Delete all those messages in a single sql call
await Data.removeMessagesByIds(messages.map(m => m.messageId)); await Data.removeMessagesByIds(messages.map(m => m.messageId));
} catch (e) { } catch (e) {
window.log.error('destroyMessages: removeMessagesByIds failed', e && e.message ? e.message : e); window.log.error('destroyMessages: removeMessagesByIds failed', e && e.message ? e.message : e);

View file

@ -72,7 +72,7 @@ async function fetchWithRedirects(
} }
urlsSeen.add(nextHrefToLoad); urlsSeen.add(nextHrefToLoad);
// This `await` is deliberatly inside of a loop. // This `await` is deliberately inside of a loop.
// eslint-disable-next-line no-await-in-loop // eslint-disable-next-line no-await-in-loop
const response = await fetchFn(nextHrefToLoad, { const response = await fetchFn(nextHrefToLoad, {
...options, ...options,

View file

@ -126,7 +126,7 @@ function isLinkSneaky(href: string) {
return true; return true;
} }
// This is necesary because getDomain returns domains in punycode form. // This is necessary because getDomain returns domains in punycode form.
const unicodeDomain = nodeUrl.domainToUnicode const unicodeDomain = nodeUrl.domainToUnicode
? nodeUrl.domainToUnicode(url.hostname) ? nodeUrl.domainToUnicode(url.hostname)
: url.hostname; : url.hostname;