GetUserChatDebugLogging returns whether chat debug logging is active for the current user and whether the user may change it.
(ctx context.Context)
| 2987 | // GetUserChatDebugLogging returns whether chat debug logging is active |
| 2988 | // for the current user and whether the user may change it. |
| 2989 | func (c *ExperimentalClient) GetUserChatDebugLogging(ctx context.Context) (UserChatDebugLoggingSettings, error) { |
| 2990 | res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/user-debug-logging", nil) |
| 2991 | if err != nil { |
| 2992 | return UserChatDebugLoggingSettings{}, err |
| 2993 | } |
| 2994 | defer res.Body.Close() |
| 2995 | if res.StatusCode != http.StatusOK { |
| 2996 | return UserChatDebugLoggingSettings{}, ReadBodyAsError(res) |
| 2997 | } |
| 2998 | var resp UserChatDebugLoggingSettings |
| 2999 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 3000 | } |
| 3001 | |
| 3002 | // UpdateUserChatDebugLogging updates the current user's chat debug |
| 3003 | // logging preference. |