diff --git a/core/lib/external/tgkit/client.go b/core/lib/external/tgkit/client.go
index b2503d7..d6f75af 100644
--- a/core/lib/external/tgkit/client.go
+++ b/core/lib/external/tgkit/client.go
@@ -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))
diff --git a/service/telegram_service/handlers/approval/handler.go b/service/telegram_service/handlers/approval/handler.go
index fd3a668..b525451 100644
--- a/service/telegram_service/handlers/approval/handler.go
+++ b/service/telegram_service/handlers/approval/handler.go
@@ -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(
"📋 Тема: %s\n📝 Текст: %s\n💬 Причина отзыва: %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(
diff --git a/service/telegram_service/handlers/approval/handler_decision.go b/service/telegram_service/handlers/approval/handler_decision.go
index 4215e2c..2dc7626 100644
--- a/service/telegram_service/handlers/approval/handler_decision.go
+++ b/service/telegram_service/handlers/approval/handler_decision.go
@@ -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(