Skip to content

Commit

Permalink
Add LastUserMessage field to the Chat struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Neur0toxine authored Oct 14, 2024
2 parents 8eb473d + b0e374f commit 7b80d3d
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,17 @@ type (
}

ChatResponseItem struct {
ID uint64 `json:"id"`
Avatar string `json:"avatar"`
Name string `json:"name"`
Channel Channel `json:"channel,omitempty"`
Customer UserRef `json:"customer"`
AuthorID uint64 `json:"author_id"`
LastMessage Message `json:"last_message"`
LastActivity string `json:"last_activity"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ID uint64 `json:"id"`
Avatar string `json:"avatar"`
Name string `json:"name"`
Channel Channel `json:"channel,omitempty"`
Customer UserRef `json:"customer"`
AuthorID uint64 `json:"author_id"`
LastMessage Message `json:"last_message"`
LastUserMessage MessageID `json:"last_user_message"`
LastActivity string `json:"last_activity"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}

MemberResponseItem struct {
Expand Down Expand Up @@ -470,6 +471,10 @@ type (
*AttachmentList
}

MessageID struct {
ID uint64 `json:"id"`
}

TextMessage struct {
Content string `json:"content"`
Quote *QuoteMessage `json:"quote"`
Expand Down Expand Up @@ -623,15 +628,16 @@ type (
}

Chat struct {
ID uint64 `json:"id"`
Avatar string `json:"avatar"`
Name string `json:"name"`
Channel *Channel `json:"channel,omitempty"`
Members []Member `json:"members"`
Customer *UserRef `json:"customer"`
AuthorID uint64 `json:"author_id"`
LastMessage *Message `json:"last_message"`
LastActivity string `json:"last_activity"`
ID uint64 `json:"id"`
Avatar string `json:"avatar"`
Name string `json:"name"`
Channel *Channel `json:"channel,omitempty"`
Members []Member `json:"members"`
Customer *UserRef `json:"customer"`
AuthorID uint64 `json:"author_id"`
LastMessage *Message `json:"last_message"`
LastUserMessage *MessageID `json:"last_user_message"`
LastActivity string `json:"last_activity"`
}

WaitingChat struct {
Expand Down

0 comments on commit 7b80d3d

Please sign in to comment.