Private
Public Access
1
0

Update SendMessage for new protocol

This commit is contained in:
2024-01-03 23:46:10 -08:00
parent d8ca07f92a
commit a8043e53b3
3 changed files with 7 additions and 16 deletions

View File

@@ -248,13 +248,8 @@ func (m *MockHTTPServer) handleSendMessage(w http.ResponseWriter, r *http.Reques
// Send message
m.Server.SendMessage(conversation, message)
// Formulate response
sendMessageResp := SendMessageResponse{
Guid: message.Guid,
}
// Encode response as JSON
jsonData, err := json.Marshal(sendMessageResp)
jsonData, err := json.Marshal(message)
if err != nil {
log.Error().Err(err).Msg("Error marshalling response")
http.Error(w, err.Error(), http.StatusInternalServerError)