tsk-54: Tweak instant message endpoint to save contact and message identification (#56)
Closes #54 Reviewed-on: phoenix/textsender-api#56 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -110,6 +110,9 @@ func (s *SendInstantMessageHandler) Send(w http.ResponseWriter, r *http.Request)
|
||||
mer.Response = data
|
||||
mer.UserId = req.UserId
|
||||
mer.Sent = parsedTime
|
||||
mer.Status = message.Message_Event_Response_Status_Instant
|
||||
mer.ContactId = c.Id
|
||||
mer.MessageId = &msg.Id
|
||||
if err := s.MERStore.Create(ctx, &mer); err != nil {
|
||||
statusCode = http.StatusInternalServerError
|
||||
resp.Message = err.Error()
|
||||
|
||||
Reference in New Issue
Block a user