fix: возвращать главное меню после callback оплаты#53
Conversation
При получении callback от Platega (успешная оплата или отмена) бот отправлял сообщение без клавиатуры — кнопки «Проверить оплату» и «Отмена» оставались на месте. Теперь callback-уведомления отправляются с userKeyboard, а состояние ожидания оплаты сбрасывается. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex фас |
|
To use Codex here, create an environment for this repo. |
|
Эахахаэаээа
|
|
@codex ничего не сломается если в main такой pr залить? |
|
Codex couldn't complete this request. Try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa166d79a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Сбрасываем состояние ожидания оплаты | ||
| h.bot.userStates.Delete(payment.TelegramID) |
There was a problem hiding this comment.
Stop deleting arbitrary user state on payment callbacks
userStates is the global dialog router, not a payment-only flag. handleTextMessage explicitly lets a user leave StateWaitPayment* via any main-menu button (internal/bot/handlers.go:238-240) and then enter another flow such as moderator/admin price changes or broadcasts. If the Platega callback lands after that, this unconditional Delete wipes the new state, so the next message is no longer routed to the in-progress flow. Please only clear StateWaitPaymentMethod / StateWaitPaymentResult here; the same regression is repeated in handleCanceled below.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Чё он тебе тут высрал
Я не понимать китайский
Безусловный Delete мог затереть состояние другого flow, если пользователь уже перешёл в него до прихода callback от Platega. Теперь состояние удаляется только если оно StateWaitPaymentMethod или StateWaitPaymentResult. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex фас на последний коммит |
|
To use Codex here, create an environment for this repo. |
|
@codex фас на последний коммит |
|
Codex couldn't complete this request. Try again later. |
|
@claude фас |
|
Вот, ci наконец тесты запустил |
|
@codex фас на последний коммит я сказал |
|
Codex couldn't complete this request. Try again later. |
|
@codex фас на последний коммит я сказал |
|
Codex couldn't complete this request. Try again later. |
|
@codex es tev tagad uz operatīvo atmiņu nopīšu, skotina tāda, ātri pēdējo komitu apskatīes |
|
Надоела эта ебатория |
ща клода попрошу |
|
ладна |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
userKeyboard(главное меню), состояние ожидания оплаты сбрасываетсяsendSchedulerMessageWithKeyboardдля отправки сообщений с клавиатурой из фоновых обработчиковTest plan
make tests— все тесты проходятmake fmt— форматирование в порядке🤖 Generated with Claude Code