From 61c7a90aeb7c2d88ec6edbedf20b73b3238ee2f0 Mon Sep 17 00:00:00 2001 From: NW Date: Wed, 5 Aug 2026 12:20:16 +0100 Subject: [PATCH] =?UTF-8?q?fix(bot):=20issue=20#130=20=E2=80=94=20crypto?= =?UTF-8?q?=20deposit=20photo-edit=20400,=20chat=20cleanup=20via=20lastInl?= =?UTF-8?q?ineMessageId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - depositHandler: handleDepositInstruction + handleDepositSelectWallet use editOrSendCallback (photo-safe fallback) — fixes 'no text in the message to edit' 400 - resetUserContext deletes lastInlineMessageId (stale inline menus cleaned on Reply Keyboard nav) - showProducts/showProfile/showBalance/showPurchases store lastInlineMessageId on sendMessage - answerCallbackQuery verified before dispatch (v1.2.4) - 48 tests pass; bump v1.2.5 --- VERSION.md | 7 +++- src/admin/views/partials/app-sidebar.ejs | 6 ++-- src/handlers/userHandlers/userHandler.js | 4 ++- .../userHandlers/userProductHandler.js | 3 +- .../userHandlers/userPurchaseHandler.js | 3 +- .../userHandlers/wallet/balanceHandler.js | 4 ++- .../userHandlers/wallet/depositHandler.js | 36 +++++++------------ src/utils/messageUtils.js | 2 +- 8 files changed, 32 insertions(+), 33 deletions(-) diff --git a/VERSION.md b/VERSION.md index b2e21b7..66f6850 100644 --- a/VERSION.md +++ b/VERSION.md @@ -9,10 +9,15 @@ ## Current Version -**v1.2.4** — 2026-08-05 +**v1.2.5** — 2026-08-05 ## Changelog +### v1.2.5 — 2026-08-05 +- **fix**: crypto deposit error — handleDepositInstruction/handleDepositSelectWallet use editOrSendCallback (photo-safe fallback, fixes "no text in the message to edit" 400) +- **fix**: chat clutter — lastInlineMessageId tracked in showProducts/showProfile/showBalance/showPurchases and deleted in resetUserContext +- **verify**: answerCallbackQuery before dispatch in all callback paths (v1.2.4) + ### v1.2.4 — 2026-08-05 - **fix**: missing `shop_district_` / `shop_subcategory_` callback handlers — Back button in empty categories now works (handleDistrictBack) - **fix**: state.location pipe-delimited (encodeURIComponent) — multi-word names (Saint Petersburg) no longer break navigation diff --git a/src/admin/views/partials/app-sidebar.ejs b/src/admin/views/partials/app-sidebar.ejs index 93bd029..2186092 100644 --- a/src/admin/views/partials/app-sidebar.ejs +++ b/src/admin/views/partials/app-sidebar.ejs @@ -28,7 +28,7 @@ - v1.2.4 + v1.2.5 @@ -43,10 +43,10 @@