fix duplicates message for open groups

pull/1405/head
Audric Ackermann 4 years ago
parent 2af4938ff2
commit 0a4cae4183
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -380,7 +380,7 @@ async function isMessageDuplicate({
if (!result) {
return false;
}
const filteredResult = result.filter(
const filteredResult = [result].filter(
(m: any) => m.attributes.body === message.body
);
const isSimilar = filteredResult.some((m: any) =>

@ -53,7 +53,7 @@ export class MessageController {
window.log.warn('Cleaning up getMessageController() oldest messages...');
const now = Date.now();
this.messageLookup.forEach(messageEntry => {
(this.messageLookup || []).forEach(messageEntry => {
const { message, timestamp } = messageEntry;
const conversation = message.getConversation();

Loading…
Cancel
Save