server: enqueue message update after sending. real server does this
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user