From 47030d94306f4bba7562b44076d8043f912be6c2 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Wed, 20 Nov 2024 17:53:00 +1300 Subject: [PATCH] use incremental patch to avoid conflict error --- src/js/Database.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/Database.js b/src/js/Database.js index 8d7bb97..a081c84 100644 --- a/src/js/Database.js +++ b/src/js/Database.js @@ -180,7 +180,7 @@ class Message { }); // patch the message with the new acked by id - return await latestMessageByPacketId.patch({ + return await latestMessageByPacketId.incrementalPatch({ acked_by_node_id: ackedByNodeId, }); @@ -204,7 +204,7 @@ class Message { }); // patch the message with the error - return await latestMessageByPacketId.patch({ + return await latestMessageByPacketId.incrementalPatch({ error: error, }); @@ -231,7 +231,7 @@ class Message { }); // patch the message with the error - return await latestMessageByText.patch({ + return await latestMessageByText.incrementalPatch({ error: errorMessage, });