Private
Public Access
1
0

Fix bug where generated messages have wrong guids

This commit is contained in:
2023-08-23 21:29:13 -07:00
parent b92d1a2892
commit 7895a3a2e0

View File

@@ -9,6 +9,7 @@ import (
"code.severnaya.net/kordophone-mock/v2/model" "code.severnaya.net/kordophone-mock/v2/model"
"code.severnaya.net/kordophone-mock/v2/server" "code.severnaya.net/kordophone-mock/v2/server"
"github.com/chzyer/readline" "github.com/chzyer/readline"
"github.com/google/uuid"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
) )
@@ -81,7 +82,7 @@ func (p *Prompt) receiveMessage(guid string, text string) {
} }
message := model.Message{ message := model.Message{
Guid: guid, Guid: uuid.New().String(),
Sender: &conversation.Participants[0], Sender: &conversation.Participants[0],
Text: text, Text: text,
Date: time.Now(), Date: time.Now(),