From cc80200f4038fefa3c08eec36f0a46220dcca9ec Mon Sep 17 00:00:00 2001
From: Jake Taylor <jake@elixxir.io>
Date: Thu, 9 Mar 2023 13:38:08 -0600
Subject: [PATCH] update comments for MessageReceivedCallback

---
 indexedDb/worker/dm/init.go | 3 ++-
 wasm/dm.go                  | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/indexedDb/worker/dm/init.go b/indexedDb/worker/dm/init.go
index 14b72acf..42b6520f 100644
--- a/indexedDb/worker/dm/init.go
+++ b/indexedDb/worker/dm/init.go
@@ -25,7 +25,8 @@ import (
 
 // MessageReceivedCallback is called any time a message is received or updated.
 //
-// update is true if the row is old and was edited.
+// messageUpdate is true if the Message already exists and was edited.
+// conversationUpdate is true if the Conversation was created or modified.
 type MessageReceivedCallback func(uuid uint64, pubKey ed25519.PublicKey,
 	messageUpdate, conversationUpdate bool)
 
diff --git a/wasm/dm.go b/wasm/dm.go
index 70b51c00..27d1e81d 100644
--- a/wasm/dm.go
+++ b/wasm/dm.go
@@ -190,8 +190,9 @@ func NewDMClientWithIndexedDb(_ js.Value, args []js.Value) any {
 //     returned as an int and the channelID as a Uint8Array. The row in the
 //     database that was updated can be found using the UUID. The channel ID is
 //     provided so that the recipient can filter if they want to the processes
-//     the update now or not. An "update" bool is present which tells you if
-//     the row is new or if it is an edited old row
+//     the update now or not. messageUpdate is true if the Message already
+//     exists and was edited. conversationUpdate is true if the Conversation
+//     was created or modified.
 //
 // Returns a promise:
 //   - Resolves to a Javascript representation of the [DMClient] object.
-- 
GitLab