Don't add duplicate errors to the database
This commit is contained in:
@@ -1403,6 +1403,14 @@
|
||||
}
|
||||
const envelope = ev.proto;
|
||||
const message = await initIncomingMessage(envelope, { isError: true });
|
||||
const isDuplicate = await isMessageDuplicate(message);
|
||||
if (isDuplicate) {
|
||||
ev.confirm();
|
||||
window.log.warn(
|
||||
`Got duplicate error for message ${message.idForLogging()}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await message.saveErrors(error || new Error('Error was null'));
|
||||
const id = message.get('conversationId');
|
||||
|
Reference in New Issue
Block a user