Skip to content

Commit

Permalink
Fix message thread ID
Browse files Browse the repository at this point in the history
  • Loading branch information
mymmrac committed May 7, 2024
1 parent a7bba26 commit 0d55435
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions internal/handler/message/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ func (h *handler) rules(ctx context.Context, bot *telego.Bot, message telego.Mes
))

_, err := bot.SendMessage(&telego.SendMessageParams{
ChatID: message.Chat.ChatID(),
ParseMode: telego.ModeHTML,
Text: messages.Rules,
ChatID: message.Chat.ChatID(),
MessageThreadID: message.MessageThreadID,
ParseMode: telego.ModeHTML,
Text: messages.Rules,
})
if err != nil {
log.Error("Sending rules message failed", slog.Any("error", err))
Expand All @@ -50,9 +51,10 @@ func (h *handler) usefulInfo(ctx context.Context, bot *telego.Bot, message teleg
))

_, err := bot.SendMessage(&telego.SendMessageParams{
ChatID: message.Chat.ChatID(),
ParseMode: telego.ModeHTML,
Text: messages.Resources,
ChatID: message.Chat.ChatID(),
MessageThreadID: message.MessageThreadID,
ParseMode: telego.ModeHTML,
Text: messages.Resources,
})
if err != nil {
log.Error("Sending useful info message failed", slog.Any("error", err))
Expand All @@ -68,9 +70,10 @@ func (h *handler) help(ctx context.Context, bot *telego.Bot, message telego.Mess
))

_, err := bot.SendMessage(&telego.SendMessageParams{
ChatID: message.Chat.ChatID(),
ParseMode: telego.ModeHTML,
Text: fmt.Sprintf(messages.Help, message.From.FirstName, viper.GetString("admin-username")),
ChatID: message.Chat.ChatID(),
MessageThreadID: message.MessageThreadID,
ParseMode: telego.ModeHTML,
Text: fmt.Sprintf(messages.Help, message.From.FirstName, viper.GetString("admin-username")),
})
if err != nil {
log.Error("Sending help message failed", slog.Any("error", err))
Expand Down

0 comments on commit 0d55435

Please sign in to comment.