фиксы

This commit is contained in:
Artem Tsyrulnikov
2026-02-28 13:37:58 +03:00
parent 9c8fd68ee3
commit ffd7a7c10f
4 changed files with 28 additions and 14 deletions

View File

@@ -328,13 +328,25 @@ func (s *PurchaseOptionalDetails) HandleCallback(b *bot.Bot, u *echotron.Update)
if strings.HasPrefix(u.CallbackQuery.Data, "type:") {
value := strings.TrimPrefix(u.CallbackQuery.Data, "type:")
// Нормализуем значение для БД
var normalized string
switch value {
case "mutual_pr":
s.PurchaseType = "взаимный пиар"
normalized = "взаимный пиар"
case "standard":
s.PurchaseType = "стандарт"
normalized = "стандарт"
}
s.InputMode = ""
if s.CurrentChannel != "" {
s.PurchaseTypeByChannel[s.CurrentChannel] = normalized
} else {
s.PurchaseType = normalized
}
if s.ReturnMode != "" {
s.InputMode = s.ReturnMode
s.ReturnMode = ""
} else {
s.InputMode = ""
}
s.CurrentChannel = ""
s.Enter(b, bot.EditMessage)
return
}