Private
Public Access
1
0

server: enqueue message update after sending. real server does this

This commit is contained in:
2025-05-02 15:52:01 -07:00
parent 05b4beb2fb
commit ecf66131e9

View File

@@ -9,11 +9,11 @@ import (
"sort"
"time"
"github.com/google/uuid"
"github.com/rs/zerolog/log"
"go.buzzert.net/kordophone-mock/data"
"go.buzzert.net/kordophone-mock/model"
"go.buzzert.net/kordophone-mock/resources"
"github.com/google/uuid"
"github.com/rs/zerolog/log"
)
const VERSION string = "KordophoneMock-2.6"
@@ -246,6 +246,12 @@ func (s *Server) SendMessage(conversation *model.Conversation, message model.Mes
ourConversation.Date = message.Date
log.Info().EmbedObject(message).Msgf("Sent message to conversation %s", conversation.Guid)
// Enqueue Update
s.EnqueueUpdateItem(model.UpdateItem{
Conversation: ourConversation,
Message: nil, // not what I would do today, but this is what the server does
})
}
func (s *Server) ReceiveMessage(conversation *model.Conversation, message model.Message) {