(new): rich message support
Golang lint / lint (pull_request) Successful in 1m20s
Golang lint / lint (push) Successful in 4m8s

(fix): runtime reliability
(tests): regression coverage
(doc): v1.1 release notes
This commit is contained in:
2026-08-12 16:34:44 +03:00
parent 48ddf66540
commit f03a081ed6
83 changed files with 6122 additions and 1925 deletions
+3 -3
View File
@@ -236,7 +236,7 @@ func (r TelegramRequest[R, P]) doRequest(ctx context.Context, api *API) (R, erro
req.Body = io.NopCloser(buf)
req.ContentLength = int64(len(reqData))
api.logger.Debugln("REQ", url, string(reqData))
api.logger.Debugln("REQ", url, redactRequestLog(reqData))
resp, err := api.client.Do(req)
if err != nil {
return zero, fmt.Errorf("HTTP request failed: %w", err)
@@ -248,7 +248,7 @@ func (r TelegramRequest[R, P]) doRequest(ctx context.Context, api *API) (R, erro
return zero, fmt.Errorf("failed to read response body: %w", err)
}
api.logger.Debugln("RES", r.method, string(respData))
api.logger.Debugln("RES", responseLogSummary(r.method, len(respData)))
response, err := parseBody[R](respData)
if err != nil {
@@ -269,7 +269,7 @@ func (r TelegramRequest[R, P]) doRequest(ctx context.Context, api *API) (R, erro
// Apply cooldown to global or chat-specific limiter
if api.Limiter != nil {
if r.chatID > 0 {
if r.chatID != 0 {
api.Limiter.SetChatLock(r.chatID, after)
} else {
api.Limiter.SetGlobalLock(after)