Skip to content
Snippets Groups Projects

first pass at adding dm package to indexedDb, split some shared code into utils

Merged Jake Taylor requested to merge XX-4335/DmStorage into project/DM
Files
9
@@ -167,7 +167,7 @@ func (w *wasmModel) deleteMsgByChannel(channelID *id.ID) error {
// user of the API to filter such called by message ID.
func (w *wasmModel) ReceiveMessage(channelID *id.ID,
messageID cryptoChannel.MessageID, nickname, text string,
pubKey ed25519.PublicKey, dmToken []byte, codeset uint8,
pubKey ed25519.PublicKey, dmToken uint32, codeset uint8,
timestamp time.Time, lease time.Duration, round rounds.Round,
mType channels.MessageType, status channels.SentStatus) uint64 {
textBytes := []byte(text)
@@ -203,7 +203,7 @@ func (w *wasmModel) ReceiveMessage(channelID *id.ID,
// the initial message. As a result, it may be important to buffer replies.
func (w *wasmModel) ReceiveReply(channelID *id.ID,
messageID cryptoChannel.MessageID, replyTo cryptoChannel.MessageID,
nickname, text string, pubKey ed25519.PublicKey, dmToken []byte, codeset uint8,
nickname, text string, pubKey ed25519.PublicKey, dmToken uint32, codeset uint8,
timestamp time.Time, lease time.Duration, round rounds.Round,
mType channels.MessageType, status channels.SentStatus) uint64 {
textBytes := []byte(text)
@@ -239,7 +239,7 @@ func (w *wasmModel) ReceiveReply(channelID *id.ID,
// the initial message. As a result, it may be important to buffer reactions.
func (w *wasmModel) ReceiveReaction(channelID *id.ID,
messageID cryptoChannel.MessageID, reactionTo cryptoChannel.MessageID,
nickname, reaction string, pubKey ed25519.PublicKey, dmToken []byte, codeset uint8,
nickname, reaction string, pubKey ed25519.PublicKey, dmToken uint32, codeset uint8,
timestamp time.Time, lease time.Duration, round rounds.Round,
mType channels.MessageType, status channels.SentStatus) uint64 {
textBytes := []byte(reaction)
@@ -332,7 +332,7 @@ func (w *wasmModel) UpdateSentStatus(uuid uint64,
// 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 string,
text []byte, pubKey ed25519.PublicKey, dmToken []byte, codeset uint8, timestamp time.Time,
text []byte, pubKey ed25519.PublicKey, dmToken uint32, codeset uint8, timestamp time.Time,
lease time.Duration, round id.Round, mType channels.MessageType,
status channels.SentStatus) *Message {
return &Message{
Loading