mirror of
https://github.com/makayabou/asg-server.git
synced 2026-05-02 17:43:36 +02:00
add State in MessageOut struct
This commit is contained in:
parent
18543f7dbb
commit
30186a5653
@ -42,7 +42,7 @@ func messageToDomain(input Message) (MessageOut, error) {
|
||||
},
|
||||
CreatedAt: input.CreatedAt,
|
||||
}
|
||||
if len(input.States) > 0 || input.Device != nil {
|
||||
if len(input.States) > 0 || input.DeviceID != nil {
|
||||
state := modelToMessageState(input)
|
||||
out.State = &state
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ type MessageOut struct {
|
||||
MessageIn
|
||||
|
||||
CreatedAt time.Time
|
||||
State *MessageStateOut `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type MessageStateIn struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user