Skip to content
Snippets Groups Projects
Commit 0ceb7d08 authored by Jake Taylor's avatar Jake Taylor
Browse files

merge release in

parent e455c1eb
No related branches found
No related tags found
4 merge requests!60Revert "Fail a test to be sure it works",!39first pass at adding dm package to indexedDb, split some shared code into utils,!36project/DM,!32Admin Commands
......@@ -60,7 +60,7 @@ func TestWasmModel_msgIDLookup(t *testing.T) {
}
testMsg := buildMessage([]byte(testString), testMsgId.Bytes(), nil,
testString, []byte(testString), []byte{8, 6, 7, 5}, 0, netTime.Now(),
testString, []byte(testString), []byte{8, 6, 7, 5}, 0, 0, netTime.Now(),
time.Second, 0, 0, channels.Sent)
_, err = eventModel.receiveHelper(testMsg, false)
if err != nil {
......@@ -100,7 +100,7 @@ func Test_wasmModel_UpdateSentStatus(t *testing.T) {
// Store a test message
testMsg := buildMessage([]byte(testString), testMsgId.Bytes(), nil,
testString, []byte(testString), []byte{8, 6, 7, 5}, 0, netTime.Now(),
testString, []byte(testString), []byte{8, 6, 7, 5}, 0, 0, netTime.Now(),
time.Second, 0, 0, channels.Sent)
uuid, err := eventModel.receiveHelper(testMsg, false)
if err != nil {
......@@ -225,7 +225,7 @@ func Test_wasmModel_UUIDTest(t *testing.T) {
copy(msgID[:], testString+fmt.Sprintf("%d", i))
rnd := rounds.Round{ID: id.Round(42)}
uuid := eventModel.ReceiveMessage(channelID, msgID, "test",
testString+fmt.Sprintf("%d", i), []byte{8, 6, 7, 5}, 0,
testString+fmt.Sprintf("%d", i), []byte{8, 6, 7, 5}, 0, 0,
netTime.Now(), time.Hour, rnd, 0, channels.Sent)
uuids[i] = uuid
}
......@@ -270,7 +270,7 @@ func Test_wasmModel_DuplicateReceives(t *testing.T) {
channelID := id.NewIdFromBytes([]byte(testString), t)
rnd := rounds.Round{ID: id.Round(42)}
uuid := eventModel.ReceiveMessage(channelID, msgID, "test",
testString+fmt.Sprintf("%d", i), []byte{8, 6, 7, 5}, 0,
testString+fmt.Sprintf("%d", i), []byte{8, 6, 7, 5}, 0, 0,
netTime.Now(), time.Hour, rnd, 0, channels.Sent)
uuids[i] = uuid
}
......@@ -326,7 +326,7 @@ func Test_wasmModel_deleteMsgByChannel(t *testing.T) {
testMsgId := channel.MakeMessageID([]byte(testStr), &id.ID{1})
eventModel.ReceiveMessage(thisChannel, testMsgId, testStr, testStr,
[]byte{8, 6, 7, 5}, 0, netTime.Now(), time.Second,
[]byte{8, 6, 7, 5}, 0, 0, netTime.Now(), time.Second,
rounds.Round{ID: id.Round(0)}, 0, channels.Sent)
}
......@@ -400,7 +400,7 @@ func TestWasmModel_receiveHelper_UniqueIndex(t *testing.T) {
// First message insert should succeed
testMsgId := channel.MakeMessageID([]byte(testString), &id.ID{1})
testMsg := buildMessage([]byte(testString), testMsgId.Bytes(), nil,
testString, []byte(testString), []byte{8, 6, 7, 5}, 0, netTime.Now(),
testString, []byte(testString), []byte{8, 6, 7, 5}, 0, 0, netTime.Now(),
time.Second, 0, 0, channels.Sent)
_, err = eventModel.receiveHelper(testMsg, false)
if err != nil {
......@@ -423,7 +423,7 @@ func TestWasmModel_receiveHelper_UniqueIndex(t *testing.T) {
// Now insert a message with a different message ID from the first
testMsgId2 := channel.MakeMessageID([]byte(testString), &id.ID{2})
testMsg = buildMessage([]byte(testString), testMsgId2.Bytes(), nil,
testString, []byte(testString), []byte{8, 6, 7, 5}, 0, netTime.Now(),
testString, []byte(testString), []byte{8, 6, 7, 5}, 0, 0, netTime.Now(),
time.Second, 0, 0, channels.Sent)
primaryKey, err := eventModel.receiveHelper(testMsg, false)
if err != nil {
......
......@@ -61,7 +61,7 @@ type Message struct {
// User cryptographic Identity struct -- could be pulled out
Pubkey []byte `json:"pubkey"`
DmToken []byte `json:"dm_token"`
DmToken uint32 `json:"dm_token"`
CodesetVersion uint8 `json:"codeset_version"`
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment