Updated proxy settings && fix user input text format

This commit is contained in:
romanskijdev 2026-11-02 17:38:14 +03:00
parent 489666bc9a
commit 045b9035d3
3 changed files with 7 additions and 5 deletions

View File

@ -230,7 +230,7 @@ func (t *CustomAPIProxyTransport) roundTripWithRetry(req *http.Request, bodyByte
continue
}
if resp.StatusCode != http.StatusOK {
if resp.StatusCode >= 500 {
defer resp.Body.Close()
errorBody, _ := io.ReadAll(resp.Body)
return nil, fmt.Errorf("proxy returned status %d (%s): %s", resp.StatusCode, resp.Status, string(errorBody))

View File

@ -12,6 +12,7 @@ import (
"fmt"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
"github.com/sirupsen/logrus"
"html"
"time"
)
@ -363,7 +364,7 @@ func (h *Handler) HandleRevokeWithComment(bot *tgbotapi.BotAPI, chatID int64, te
topicFullName := getTopicFullName(ctx, h.ipc, approval.TopicID)
content := "—"
if approval.Content != nil {
content = *approval.Content
content = html.EscapeString(*approval.Content)
}
approvalCard := fmt.Sprintf(
"📋 <b>Тема:</b> %s\n📝 <b>Текст:</b> %s\n💬 <b>Причина отзыва:</b> %s",
@ -421,7 +422,7 @@ func (h *Handler) performActualRevoke(
topicFullName := getTopicFullName(ctx, h.ipc, approval.TopicID)
content := "—"
if approval.Content != nil {
content = *approval.Content
content = html.EscapeString(*approval.Content)
}
approvalCard := fmt.Sprintf(

View File

@ -8,6 +8,7 @@ import (
"fmt"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
"github.com/sirupsen/logrus"
"html"
"strings"
"time"
)
@ -106,7 +107,7 @@ func (h *Handler) processNextStepOrComplete(bot *tgbotapi.BotAPI, ctx context.Co
content := "—"
if approval.Content != nil {
content = *approval.Content
content = html.EscapeString(*approval.Content)
}
progressText := fmt.Sprintf(
@ -393,7 +394,7 @@ func (h *Handler) handleDecision(
topicFullName := getTopicFullName(ctx, h.ipc, approval.TopicID)
content := "—"
if approval.Content != nil {
content = *approval.Content
content = html.EscapeString(*approval.Content)
}
approvalCard := fmt.Sprintf(