Skip to content

Commit

Permalink
Fix ExportUserResponse struct to match the exact structure to the res…
Browse files Browse the repository at this point in the history
…ponse of the GET /users/{user_id}/export endpoint

The actual response has a User object and the user's messages and reactions.
https://getstream.io/chat/docs/rest/#product:chat-exportuser
  • Loading branch information
zsadm authored and Ádám Zsoldi committed Jul 17, 2024
1 parent b205b63 commit c332517
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,10 @@ func (c *Client) CreateGuestUser(ctx context.Context, user *User) (*GuestUserRes
}

type ExportUserResponse struct {
*User
Response
User *User `json:"user"`
Messages []*Message `json:"messages"`
Reactions []*Reaction `json:"reactions"`
Duration string `json:"duration"`
}

// ExportUser exports the user with the given target user ID.
Expand Down

0 comments on commit c332517

Please sign in to comment.