From 784495b3a2d37c48757ce48c63a5f3f7e528a1e6 Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Sat, 24 Sep 2022 23:57:44 +0000 Subject: [PATCH] Add a note as to why the ID field is not set on a new message --- indexedDb/implementation.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indexedDb/implementation.go b/indexedDb/implementation.go index b212eea7..c889f95f 100644 --- a/indexedDb/implementation.go +++ b/indexedDb/implementation.go @@ -236,6 +236,10 @@ func (w *wasmModel) UpdateSentStatus(uuid uint64, messageID cryptoChannel.Messag // buildMessage is a private helper that converts typical [channels.EventModel] // inputs into a basic Message structure for insertion into storage. +// NOTE: ID is not set inside this function because we want to use the +// autoincrement key by default. If you are trying to overwrite +// an existing message, then you need to set it manually +// yourself. func buildMessage(channelID, messageID, parentID []byte, nickname, text string, identity cryptoChannel.Identity, timestamp time.Time, lease time.Duration, -- GitLab