diff --git a/.eslintignore b/.eslintignore index 5ec61c91a..cbc861134 100644 --- a/.eslintignore +++ b/.eslintignore @@ -26,6 +26,8 @@ test/blanket_mocha.js # TypeScript generated files ts/**/*.js +**/ts/**/*.js + # Libloki specific files libloki/test/components.js diff --git a/test/ts/keychange_listener_test.ts b/test/ts/keychange_listener_test.ts index cb63ca72e..e6493ca53 100644 --- a/test/ts/keychange_listener_test.ts +++ b/test/ts/keychange_listener_test.ts @@ -1,9 +1,8 @@ +// tslint:disable-next-line: no-implicit-dependencies import { assert } from 'chai'; const { libsignal, Whisper, ConversationController } = window; -import { mapDispatchToProps } from '../../ts/state/actions.js'; - describe('KeyChangeListener', () => { const phoneNumberWithKeyChange = '+13016886524'; // nsa const address = new libsignal.SignalProtocolAddress( diff --git a/ts/state/ducks/conversations.ts b/ts/state/ducks/conversations.ts index c58876f97..a2ec935ea 100644 --- a/ts/state/ducks/conversations.ts +++ b/ts/state/ducks/conversations.ts @@ -118,7 +118,6 @@ async function getMessages( // Set first member of series here. const messageModels = messageSet.models; - const messages = []; // no need to do that `firstMessageOfSeries` on a private chat if (conversation.isPrivate()) { return messageModels; @@ -138,9 +137,9 @@ async function getMessages( if (i > 0 && currentSender === nextSender) { firstMessageOfSeries = false; } - messages.push({ ...messageModels[i], firstMessageOfSeries }); + messageModels[i].firstMessageOfSeries = firstMessageOfSeries; } - return messages; + return messageModels; } const fetchMessagesForConversation = createAsyncThunk(