MCPcopy Index your code
hub / github.com/coder/coder / GetChatDesktopEnabled

Method GetChatDesktopEnabled

codersdk/chats.go:2530–2541  ·  view source on GitHub ↗

GetChatDesktopEnabled returns the deployment-wide desktop setting.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2528
2529// GetChatDesktopEnabled returns the deployment-wide desktop setting.
2530func (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.
2544func (c *ExperimentalClient) UpdateChatDesktopEnabled(ctx context.Context, req UpdateChatDesktopEnabledRequest) error {

Callers 1

TestChatDesktopEnabledFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestChatDesktopEnabledFunction · 0.76