Could it be?
This commit is contained in:
@@ -3,6 +3,7 @@ package mock
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"git.kundeng.us/phoenix/textsender-models/tx0/message"
|
||||
@@ -37,9 +38,13 @@ func (m *MockMessageStore) CreateMessage(ctx context.Context, msg *message.Messa
|
||||
}
|
||||
|
||||
var id uuid.UUID
|
||||
if msg.Id != nil && *msg.Id == uuid.Nil {
|
||||
id = uuid.New()
|
||||
msg.Id = &id
|
||||
if msg != nil {
|
||||
if msg.Id == nil || *msg.Id == uuid.Nil {
|
||||
id = uuid.New()
|
||||
msg.Id = &id
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("Message not populated")
|
||||
}
|
||||
|
||||
key := MessageKey{Content: msg.Content, UserId: *msg.UserId}
|
||||
|
||||
Reference in New Issue
Block a user