From d691297613c77c158f3c6042e6672cd5e5d118aa Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Tue, 28 Feb 2023 16:37:34 +0000
Subject: [PATCH] Add pubkey to the message structure

---
 indexedDb/impl/dm/implementation.go | 1 +
 indexedDb/impl/dm/model.go          | 1 +
 2 files changed, 2 insertions(+)

diff --git a/indexedDb/impl/dm/implementation.go b/indexedDb/impl/dm/implementation.go
index 423c4b48..ca355ce4 100644
--- a/indexedDb/impl/dm/implementation.go
+++ b/indexedDb/impl/dm/implementation.go
@@ -87,6 +87,7 @@ func buildMessage(messageID, parentID, text []byte, pubKey ed25519.PublicKey,
 		ConversationPubKey: pubKey,
 		ParentMessageID:    parentID,
 		Timestamp:          timestamp,
+		SenderPubKey:       pubKey[:],
 		Status:             uint8(status),
 		Text:               text,
 		Type:               uint16(mType),
diff --git a/indexedDb/impl/dm/model.go b/indexedDb/impl/dm/model.go
index 191326d5..96250e03 100644
--- a/indexedDb/impl/dm/model.go
+++ b/indexedDb/impl/dm/model.go
@@ -45,6 +45,7 @@ type Message struct {
 	ConversationPubKey []byte    `json:"conversation_pub_key"` // Index
 	ParentMessageID    []byte    `json:"parent_message_id"`    // Index
 	Timestamp          time.Time `json:"timestamp"`            // Index
+	SenderPubKey       []byte    `json:"sender_pub_key"`
 	Status             uint8     `json:"status"`
 	Text               []byte    `json:"text"`
 	Type               uint16    `json:"type"`
-- 
GitLab