GetChatDesktopEnabled returns the deployment-wide desktop setting.
(ctx context.Context)
| 2528 | |
| 2529 | // GetChatDesktopEnabled returns the deployment-wide desktop setting. |
| 2530 | func (c *ExperimentalClient) GetChatDesktopEnabled(ctx context.Context) (ChatDesktopEnabledResponse, error) { |
| 2531 | res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/desktop-enabled", nil) |
| 2532 | if err != nil { |
| 2533 | return ChatDesktopEnabledResponse{}, err |
| 2534 | } |
| 2535 | defer res.Body.Close() |
| 2536 | if res.StatusCode != http.StatusOK { |
| 2537 | return ChatDesktopEnabledResponse{}, ReadBodyAsError(res) |
| 2538 | } |
| 2539 | var resp ChatDesktopEnabledResponse |
| 2540 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 2541 | } |
| 2542 | |
| 2543 | // UpdateChatDesktopEnabled updates the deployment-wide desktop setting. |
| 2544 | func (c *ExperimentalClient) UpdateChatDesktopEnabled(ctx context.Context, req UpdateChatDesktopEnabledRequest) error { |