Ensure all dates returned are ISO8601
This commit is contained in:
@@ -8,13 +8,13 @@ import (
|
||||
)
|
||||
|
||||
type Conversation struct {
|
||||
Date time.Time `json:"date"`
|
||||
Participants []string `json:"participantDisplayNames"`
|
||||
DisplayName *string `json:"displayName,omitempty"` // Optional
|
||||
UnreadCount int `json:"unreadCount"`
|
||||
LastMessagePreview string `json:"lastMessagePreview"`
|
||||
LastMessage Message `json:"lastMessage"`
|
||||
Guid string `json:"guid"`
|
||||
Date Date `json:"date"`
|
||||
Participants []string `json:"participantDisplayNames"`
|
||||
DisplayName *string `json:"displayName,omitempty"` // Optional
|
||||
UnreadCount int `json:"unreadCount"`
|
||||
LastMessagePreview string `json:"lastMessagePreview"`
|
||||
LastMessage Message `json:"lastMessage"`
|
||||
Guid string `json:"guid"`
|
||||
}
|
||||
|
||||
func (c *Conversation) GetDisplayName() string {
|
||||
@@ -27,7 +27,7 @@ func (c *Conversation) GetDisplayName() string {
|
||||
|
||||
func (c *Conversation) MarshalZerologObject(e *zerolog.Event) {
|
||||
e.Str("guid", c.Guid)
|
||||
e.Time("date", c.Date)
|
||||
e.Time("date", time.Time(c.Date))
|
||||
e.Int("unreadCount", c.UnreadCount)
|
||||
e.Str("lastMessagePreview", c.LastMessagePreview)
|
||||
e.Strs("participants", c.Participants)
|
||||
|
||||
Reference in New Issue
Block a user