From 1b8528d5e05bbb8ffa27e5d9113ac8c83622edd8 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Wed, 5 Oct 2022 17:28:34 +0000
Subject: [PATCH] Make sure the message to insert is set

---
 indexedDb/implementation.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/indexedDb/implementation.go b/indexedDb/implementation.go
index 47ebdf70..31fe6329 100644
--- a/indexedDb/implementation.go
+++ b/indexedDb/implementation.go
@@ -168,7 +168,9 @@ func (w *wasmModel) ReceiveMessage(channelID *id.ID,
 		jww.DEBUG.Printf("non-empty messageID detected")
 		uuid, err := w.msgIDLookup(messageID)
 		if err == nil && uuid != 0 {
-			jww.WARN.Printf("MessageID found: %d", uuid)
+			jww.WARN.Printf("found MessageID, will upsert: %d",
+				uuid)
+			msgToInsert.ID = uuid
 		}
 	}
 
-- 
GitLab