diff --git a/js/models/conversations.js b/js/models/conversations.js index 18dd0129e..bc0502e7f 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -1837,9 +1837,7 @@ read = read.filter(item => !item.hasErrors); if (this.isPublic()) { - window.log.debug( - 'public conversation... No need to send read receipt' - ); + window.log.debug('public conversation... No need to send read receipt'); return; } diff --git a/stylesheets/_modal.scss b/stylesheets/_modal.scss index d55046a49..1dbb2da95 100644 --- a/stylesheets/_modal.scss +++ b/stylesheets/_modal.scss @@ -170,7 +170,8 @@ .loki-dialog { & ~ .index.inbox { - filter: blur(2px); + // filter: blur(2px); // FIXME enable back once modals are moved to react + // currently it cause an issues with toast being on the foreground when a modal is shown transition: filter 0.1s; } diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index 3e57d9c49..af18550d2 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -469,6 +469,7 @@ label { cursor: pointer; } + .Toastify__toast { @include themify($themes) { background: rgba(themed('cellBackground'), 0.99); diff --git a/ts/components/session/RegistrationTabs.tsx b/ts/components/session/RegistrationTabs.tsx index 657c3deac..8773598e2 100644 --- a/ts/components/session/RegistrationTabs.tsx +++ b/ts/components/session/RegistrationTabs.tsx @@ -476,7 +476,9 @@ export class RegistrationTabs extends React.Component<{}, State> { return null; } - private renderNamePasswordAndVerifyPasswordFields(stealAutoFocus: boolean = false) { + private renderNamePasswordAndVerifyPasswordFields( + stealAutoFocus: boolean = false + ) { const { password, passwordFieldsMatch } = this.state; const passwordsDoNotMatch = !passwordFieldsMatch && this.state.password diff --git a/ts/components/session/SessionInput.tsx b/ts/components/session/SessionInput.tsx index 4913c5172..2c5535bc0 100644 --- a/ts/components/session/SessionInput.tsx +++ b/ts/components/session/SessionInput.tsx @@ -14,7 +14,6 @@ interface Props { onValueChanged?: any; onEnterPressed?: any; autoFocus?: boolean; - } interface State { diff --git a/ts/receiver/contentMessage.ts b/ts/receiver/contentMessage.ts index e578b328f..9e5431965 100644 --- a/ts/receiver/contentMessage.ts +++ b/ts/receiver/contentMessage.ts @@ -314,11 +314,17 @@ async function decrypt( return; } } else if (error instanceof window.textsecure.PreKeyMissing) { + // this error can mean two things + // 1. The sender received a session request message from us, used it to establish a session, but restored from seed + // Depending on the the date of our messsage, on restore from seed the sender might get our session request again + // He will try to use it to establish a session. In this case, we should reset the session as we cannot decode its message. + // 2. We sent a session request to the sender and he established it. But if he sends us a message before we send one to him, he will + // include the prekeyId in that new message. + // We won't find this preKeyId as we already burnt it when the sender established the session. + const convo = window.ConversationController.get(envelope.source); if (!convo) { - window.log.warn( - 'PreKeyMissing but convo is missing too. Dropping...' - ); + window.log.warn('PreKeyMissing but convo is missing too. Dropping...'); return; } void convo.endSession(); diff --git a/ts/receiver/dataMessage.ts b/ts/receiver/dataMessage.ts index 1e42317fb..4728a9e7b 100644 --- a/ts/receiver/dataMessage.ts +++ b/ts/receiver/dataMessage.ts @@ -1,6 +1,6 @@ import { SignalService } from './../protobuf'; import { removeFromCache } from './cache'; -import { MultiDeviceProtocol } from '../session/protocols'; +import { MultiDeviceProtocol, SessionProtocol } from '../session/protocols'; import { EnvelopePlus } from './types'; import { ConversationType, getEnvelopeId } from './common'; import { preprocessGroupMessage } from './groups'; diff --git a/ts/receiver/sessionHandling.ts b/ts/receiver/sessionHandling.ts index 8dc4f0579..910c7675b 100644 --- a/ts/receiver/sessionHandling.ts +++ b/ts/receiver/sessionHandling.ts @@ -31,9 +31,7 @@ export async function handleSessionRequestMessage( ) { const { libsignal, StringView, textsecure, dcodeIO, log } = window; - window.log.info( - `Received SESSION_REQUEST from source: ${envelope.source}` - ); + window.log.info(`Received SESSION_REQUEST from source: ${envelope.source}`); if (!preKeyBundleMessage) { log.warn('No pre-key bundle found in a session request'); diff --git a/ts/receiver/syncMessages.ts b/ts/receiver/syncMessages.ts index 0008a3e26..30b9d2e20 100644 --- a/ts/receiver/syncMessages.ts +++ b/ts/receiver/syncMessages.ts @@ -197,10 +197,7 @@ async function handleBlocked( } conv.trigger('change', conv); } else { - window.log.warn( - 'Did not find corresponding conversation to block', - n - ); + window.log.warn('Did not find corresponding conversation to block', n); } }