This commit is contained in:
Artem Tsyrulnikov
2026-02-03 22:20:56 +03:00
parent 7c8589e000
commit 09145e510a
10 changed files with 124 additions and 101 deletions

View File

@@ -22,20 +22,21 @@ type PurchaseChannelInput struct {
}
type SelectChannelsForPurchase struct {
ProjectID string
ProjectTitle string
ProjectTelegramID int64
ProjectUsername string
ProjectStatus string
CreativeID string
CreativeTitle string
Channels []PurchaseChannelInput
CurrentPage int
InvalidUsernames []string
Duplicates []string // дубликаты каналов
ParsingErrors []ParseError // ошибки парсинга с предложениями
OptionalDetailsState *PurchaseOptionalDetails // сохранённое состояние деталей
BackState bot.State
ProjectID string
ProjectTitle string
ProjectTelegramID int64
ProjectUsername string
ProjectStatus string
ProjectDefaultLinkType string
CreativeID string
CreativeTitle string
Channels []PurchaseChannelInput
CurrentPage int
InvalidUsernames []string
Duplicates []string // дубликаты каналов
ParsingErrors []ParseError // ошибки парсинга с предложениями
OptionalDetailsState *PurchaseOptionalDetails // сохранённое состояние деталей
BackState bot.State
}
// ParseError представляет ошибку парсинга с предложением исправления
@@ -225,12 +226,13 @@ func (s *SelectChannelsForPurchase) HandleCallback(b *bot.Bot, u *echotron.Updat
optionalDetails.Channels = s.Channels
} else {
optionalDetails = &PurchaseOptionalDetails{
ProjectID: s.ProjectID,
ProjectTitle: s.ProjectTitle,
CreativeID: s.CreativeID,
CreativeTitle: s.CreativeTitle,
Channels: s.Channels,
BackState: s,
ProjectID: s.ProjectID,
ProjectTitle: s.ProjectTitle,
ProjectDefaultLinkType: s.ProjectDefaultLinkType,
CreativeID: s.CreativeID,
CreativeTitle: s.CreativeTitle,
Channels: s.Channels,
BackState: s,
}
}
b.SetState(optionalDetails, bot.EditMessage)