Skip to content

Commit

Permalink
Merge pull request #180 from jackmcguire1/fix/chatters
Browse files Browse the repository at this point in the history
fix: chat chatters total & pagination
  • Loading branch information
nicklaw5 committed Feb 9, 2023
2 parents 09a4083 + 60ef8b6 commit 1c9d8ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type ChatChatter struct {
type ManyChatChatters struct {
Chatters []ChatChatter `json:"data"`
Pagination Pagination `json:"pagination"`
Total int `json:"total"`
}

type GetChatChattersResponse struct {
Expand All @@ -38,6 +39,8 @@ func (c *Client) GetChannelChatChatters(params *GetChatChattersParams) (*GetChat
chatters := &GetChatChattersResponse{}
resp.HydrateResponseCommon(&chatters.ResponseCommon)
chatters.Data.Chatters = resp.Data.(*ManyChatChatters).Chatters
chatters.Data.Total = resp.Data.(*ManyChatChatters).Total
chatters.Data.Pagination = resp.Data.(*ManyChatChatters).Pagination

return chatters, nil
}
Expand Down

0 comments on commit 1c9d8ba

Please sign in to comment.