Commit Graph

82 Commits

Author SHA1 Message Date
a975a9e914 fix: Allow UpdateBotTokenAsync to start bot when not previously running
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 59s
When TeleBot starts without a token configured, the TelegramBotService
returns early from StartAsync without creating a bot client. Previously,
UpdateBotTokenAsync only worked when _botClient was already initialized.

This fix changes the condition to also start the bot if _botClient is
null, enabling remote configuration via the discovery API to properly
start Telegram polling.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 17:04:53 +00:00
f367a98c53 fix: Add snake_case JSON deserialization for Telegram API response
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m0s
The Telegram API returns JSON with snake_case properties (first_name, is_bot)
but the DTOs use PascalCase. Added JsonSerializerOptions with
PropertyNameCaseInsensitive and SnakeCaseLower naming policy.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 16:50:47 +00:00
521bff2c7d feat: Add Remote TeleBot Discovery & Configuration
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m0s
- Add discovery API endpoints to TeleBot (probe, initialize, configure, status)
- Add LivenessService for LittleShop connectivity monitoring with 5min shutdown
- Add BotDiscoveryService to LittleShop for remote bot management
- Add Admin UI: DiscoverRemote wizard, RepushConfig page, status badges
- Add remote discovery fields to Bot model (RemoteAddress, RemotePort, etc.)
- Add CheckRemoteStatus and RepushConfig controller actions
- Update Index/Details views to show remote bot indicators
- Shared secret authentication for discovery, BotKey for post-init

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 13:41:36 +00:00
sysadmin
a43fa292db fix: Bot activity tracking performance - 523x faster (3000ms to 5.74ms)
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m2s
- Fixed BotActivityTracker configuration key mismatch (LittleShop:BaseUrl -> LittleShop:ApiUrl)
- Resolved DNS resolution failures causing 3-second timeouts on every activity tracking call
- Updated fallback from Docker hostname (littleshop:5000) to localhost (localhost:5000)
- Added comprehensive E2E integration test script for LittleShop + TeleBot + SilverPay
- Documented all test results with performance metrics and troubleshooting steps

Performance Improvement: 523x faster (from 3000ms+ to 5.74ms average)

Remaining Issue: SilverPay payment gateway not accessible at http://10.0.0.51:5500
Payment creation fails with HTTP 404 - requires infrastructure investigation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 17:34:06 +00:00
sysadmin
1d249d13ba fix: Bot registration duplicate prevention and SilverPay integration update
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m1s
- Fixed BotService to prevent duplicate bot registrations by checking for existing bot with same name/type
- Updated existing bot record instead of creating duplicates on re-registration
- Configured SilverPay integration with production API key
- Updated TeleBot configuration for local development (localhost API URL, Tor disabled)

This ensures single bot instances and proper payment gateway integration for testing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:56:23 +00:00
47e43d4ff8 ci: Migrate from GitLab CI/CD to Gitea Actions with CT109 pre-production
**Migration Complete:**
- Removed GitLab CI/CD configuration (.gitlab-ci.yml)
- Created Gitea Actions workflows (.gitea/workflows/)
- Disabled automatic production deployment (manual only)
- Added pre-production deployment to CT109 Docker container

**New Workflows:**
- build-and-deploy.yml: Main CI/CD pipeline with CT109 deployment
- rollback.yml: Manual rollback capability
- README.md: Comprehensive workflow documentation

**Pre-Production Environment (CT109):**
- Host: 10.0.0.51
- User: sysadmin
- Port: 22
- Deploys on push to development/main branches
- Access URL: http://ct109.local:5100

**Documentation:**
- CI_CD_MIGRATION_GITEA.md: Complete migration guide
- CI_CD_CT109_PREPRODUCTION.md: CT109 deployment architecture
- GITEA_SECRETS_SETUP_GUIDE.md: Secrets configuration instructions

**Git Remote Updated:**
- Migrated from GitLab (gitlab.silverlabs.uk) to Gitea (git.silverlabs.uk)
- Using token authentication for push/pull operations

**Next Steps:**
1. Push code to Gitea to create repository
2. Add CT109 secrets via Gitea UI (CT109_HOST, CT109_SSH_PORT, CT109_USER, CT109_SSH_KEY)
3. Test pre-production deployment workflow

🚀 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 19:10:14 +00:00
sysadmin
a07a3a54ea Fix SilverPay payment integration JSON serialization
- Changed JSON naming policy from CamelCase to SnakeCaseLower for SilverPay API compatibility
- Fixed field name from 'fiat_amount' to 'amount' in request body
- Used unique payment ID instead of order ID to avoid duplicate external_id conflicts
- Modified SilverPayApiResponse to handle string amounts from API
- Added [JsonIgnore] attributes to computed properties to prevent JSON serialization conflicts
- Fixed test compilation errors (mock service and enum casting issues)
- Updated SilverPay endpoint to http://10.0.0.52:8001/

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 14:12:35 +00:00
7008a95df3 feat: Bot management improvements with wallet configuration and duplicate detection 2025-10-10 12:34:00 +01:00
91000035f5 Fix: HandleConfirmVariant now passes variant ID instead of null
Critical fix for £0 order bug:
- When users select a variant and click 'Add to Basket', the confirmvar: callback triggers HandleConfirmVariant
- This method was passing variantId: null to AddItem(), causing cart items to have no variant and price £0
- Now looks up selected variant by name, extracts its ID, and passes it to cart
- Added logging to track which variant is being used
- Also includes CSV variant conversion utility and sample fixed import file
2025-10-08 19:54:08 +01:00
b90d2b8d29 Fix: TeleBot now uses variant prices when adding to cart
CRITICAL BUG FIX: HandleAddToCart was only checking MultiBuys for price,
never ProductVariants. This caused all variant-based products to use the
base price (£0), resulting in £0 orders.

Changes:
- HandleAddToCart now checks variants FIRST for pricing
- Falls back to multi-buy, then base price (correct priority order)
- Uses proper Product-based AddItem() method to pass variant IDs
- Added logging to track which pricing method is used
- HandleQuickBuy already had correct variant detection (no changes)

Result: Orders now correctly calculate total using variant prices (e.g., £90, £160)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 19:05:29 +01:00
23794610d9 Add: Debug logging for product variant data in TeleBot
Log variant count and prices when fetching products to diagnose
why variants aren't being detected during add-to-cart flow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 18:55:57 +01:00
aa06f420fe Add: Diagnostic logging for variant selection in TeleBot
Added logging to diagnose why orders are created with £0 pricing:
- Log when product has variants and variant selection is shown
- Log WARNING when product has no variants and base price is used
- Helps identify if variants are missing or not being detected

Troubleshooting: Orders showing £0 despite variants having correct prices

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 18:49:45 +01:00
dd494603f5 Fix: TeleBot should not use Tor for internal LittleShop API calls
**Problem**:
- GetAvailableCurrenciesAsync() was routing internal API calls through Tor
- Caused SOCKS connection failures: "SOCKS server failed to connect"
- Internal Docker network calls don't need Tor privacy layer

**Root Cause**:
- Line 617-618 used OR logic: LittleShop:UseTor OR Privacy:EnableTor
- Production config: LittleShop__UseTor=false, Privacy__EnableTor=true
- OR condition meant Tor was enabled for all API calls

**Solution**:
- Only check LittleShop:UseTor (explicitly for API calls)
- Privacy:EnableTor now only affects external Telegram API calls
- Internal calls (http://littleshop:5000) bypass Tor completely

**Benefits**:
- No more SOCKS connection errors
- Faster internal API responses (no Tor overhead)
- Tor still protects external Telegram communications

**File**: TeleBot/TeleBot/Services/LittleShopService.cs:619

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 11:33:10 +01:00
9206067e9c Fix: TeleBot order deletion and bot activity tracking
**Fixes Applied:**

1. **Order Deletion Authorization (HTTP 401)**
   - Added [AllowAnonymous] to CancelOrder endpoint
   - Allows customers to cancel orders using IdentityReference
   - File: LittleShop/Controllers/OrdersController.cs:160

2. **Bot Activity Tracking Hostname**
   - Changed littleshop-admin:8080 → littleshop:5000
   - Fixed DNS resolution errors in production
   - Files: TeleBot/appsettings.json, BotActivityTracker.cs, docker-compose.hostinger.yml

3. **Tor Proxy Investigation**
   - Analyzed SOCKS connection failures
   - Tor is working correctly, API blocks exit nodes (expected)
   - Fallback to default currencies working as designed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 11:16:32 +01:00
d897bb99c3 Fix: Saved address now persists across sessions
Root cause: Ephemeral sessions weren't persisted after checkout
- Sessions ephemeral by default, only persisted during CheckoutFlow
- After checkout completes, state changes to MainMenu
- SavedAddress was lost because session wasn't saved

Fix implemented:
- Persist ephemeral sessions when SavedAddress is not null
- Also persist when cart is non-empty (preserve cart state)
- User's saved shipping address now available on next checkout
- Improves UX - no need to re-enter address every time

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 04:58:01 +01:00
4c6a1f10d6 Fix: Delete order button now responds correctly
Root cause: Callback was answered twice (line 68 + HandleDeleteOrder)
- Telegram only allows answering callback query once
- Second attempt threw exception, preventing message edit
- Removed duplicate AnswerCallbackQueryAsync calls from HandleDeleteOrder
- Added proper error message for failed delete attempts
- Now shows success/failure via message edit instead of callback answer

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 04:42:29 +01:00
f440042204 Feature: Complete order management for pending orders
- Added delete order functionality with identity verification
- OrderDetailsMenu now shows conditional buttons based on order/payment state
- Retry payment if no payments exist
- View payment details if payment pending
- Delete order option for all pending orders
- Full client SDK implementation for CancelOrderAsync

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 04:19:47 +01:00
3cc7092967 Fix: Product details now auto-scroll into view when Buy is clicked
Problem: When clicking Buy button, product details message appeared at bottom
but Telegram didn't auto-scroll to show it, leaving users confused.

Solution: Use replyToMessageId parameter to thread product details as a reply
to the user's button click message. This:
- Creates visual thread connection
- Encourages Telegram to show the response prominently
- Makes conversation flow more natural

Also wrapped activity tracking in try-catch to prevent blocking.

Technical Changes:
- ProductCarouselService: Added replyToMessageId optional parameter
- SendPhotoAsync/SendTextMessageAsync: Use replyToMessageId with allowSendingWithoutReply
- HandleProductDetail: Pass message.MessageId to carousel service

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 04:08:50 +01:00
6676f010a8 Fix: Compilation error - use correct PaymentMethodMenu name
Error: MenuBuilder.PaymentCurrencyMenu does not exist
Fix: Changed to MenuBuilder.PaymentMethodMenu (correct method name)

TeleBot now compiles successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:57:24 +01:00
9e1bf0543f Fix: Prevent activity tracker errors from blocking checkout
Problem: Activity tracker DNS errors (littleshop-admin:8080) were blocking
checkout flow, preventing shipping address prompt from showing.

Solution: Wrap activity tracking in try-catch with warning log.
Checkout flow continues even if activity tracking fails.

This ensures users can complete checkout even if analytics are unavailable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:49:03 +01:00
17cb9c7721 Fix: Multiple TeleBot UI improvements
1. Remove /help from main menu
   - Removed " Help" button from main menu
   - Help still available via /help command

2. Fix support refresh clearing messages
   - Changed from editing message to sending new message
   - Preserves message history when refreshing
   - Shows "No new messages" if no updates instead of clearing
   - Better error handling with user-friendly alerts

3. Add retry payment button for failed payments
   - New "🔄 Retry Payment" button when payment creation fails
   - Shows order ID (friendly reference) in error message
   - PaymentFailedMenu: Retry, View Basket, Main Menu options
   - HandleRetryPayment: Re-shows currency selection
   - Preserves order and allows payment retry without recreating order

Technical Changes:
- MenuBuilder: Added PaymentFailedMenu method
- CallbackHandler: Added retry_payment case and HandleRetryPayment method
- HandlePayment: Updated error messages to use PaymentFailedMenu
- HandleRefreshConversation: Sends new message instead of editing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:48:04 +01:00
99bb083bd6 Feature: Enhanced order display and basket summary
1. Basket Summary Below Navigation
   - Welcome message now shows basket items and total
   - Format: "🛒 Basket: X item(s) - £X.XX"
   - Only shown when basket has items

2. Order Display Improvements
   - Order GUID replaced with friendly reference (last 8 chars: #XXXXXXXX)
   - Added "View Payment Details" button for pending payment orders
   - Button shows QR code, amount, address, and time until expiry
   - Variants now properly displayed in order items (already working via commit 330116e)

3. Payment Details View (New Feature)
   - HandleViewPayment: Shows payment info with QR code
   - Displays: Currency, amount, address, expiry time
   - Shows time remaining until payment expires
   - QR code generation for easy mobile payment
   - OrderDetailsMenu: Context-aware navigation buttons

4. Postal Address Auto-Load (Verified Working)
   - Checkout automatically detects saved addresses
   - Offers to use saved address with preview
   - One-click selection or option to enter new address
   - SavedAddress copied to OrderFlow when selected

Technical Changes:
- MessageFormatter.FormatWelcome: Added optional cart parameter
- MessageFormatter.FormatOrder: Uses friendly order reference
- MenuBuilder.OrderDetailsMenu: New menu with payment button
- CallbackHandler.HandleViewPayment: Payment details with QR
- CallbackHandler.HandleMainMenu: Pass cart to welcome formatter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:29:11 +01:00
9432ae8ccb UX: Major TeleBot checkout flow improvements
1. Show variants immediately on product page (removed duplicate buy button)
   - Variants now display directly on product details page
   - No intermediate "select variant" button needed
   - Faster checkout flow

2. Add post-purchase prompt (Checkout or Continue Shopping)
   - After adding to basket, shows "What would you like to do next?"
   - Options: View Basket, Checkout, or Continue Shopping
   - Continue Shopping returns to the product page

3. Remove quantity +/- buttons from product details
   - Simplified to single item purchase only
   - Cleaner interface for mobile users

4. Rename "Cart" to "Basket" throughout
   - All user-facing text updated
   - "Add to Cart" → "Add to Basket"
   - "Shopping Cart" → "Shopping Basket"
   - "View Cart" → "View Basket"
   - "Clear Cart" → "Clear Basket"

Technical Changes:
- MenuBuilder.ProductDetailMenu: Now shows variant selection inline
- CallbackHandler: Updated to use ProductDetailMenu for variant updates
- Added PostAddToCartMenu for post-purchase options
- HandleAddToCart/HandleConfirmVariant: Show prompt instead of returning to product

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 03:26:19 +01:00
1e93008df4 Fix: Variant selection now accumulates across types instead of resetting
Problem:
- Selecting Size then Color would reset Size selection
- Users could never get "Add to Cart" button with multiple variant types
- Each selection created a NEW list, wiping previous choices

Root Cause:
- HandleSetVariant created: new List<string> { variantName }
- This replaced all previous selections instead of accumulating

Fix:
1. Get existing selected variants from session
2. Find the variant type of newly selected variant
3. Remove any previous selection from the SAME type (allow changing choice)
4. Add the new selection
5. Save accumulated list back to session

Example behavior now:
- Select "Red" (Color) → selectedVariants = ["Red"]
- Select "Large" (Size) → selectedVariants = ["Red", "Large"] 
- Select "Blue" (Color) → selectedVariants = ["Blue", "Large"] 
- Can now confirm when all types selected

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 02:44:28 +01:00
cb80e0161c Fix: Variant selection now requires choosing from ALL variant types
Problem:
- Product with Size + Color only required selecting 1 variant total
- User could add to cart after selecting just Size OR Color, not both

Root Cause:
- Logic checked if selectedVariants.Count == 1 for single items
- Didn't verify that all variant types were covered

Fix:
- For single items: Check that each variant type has at least one selection
- Logic: variantGroups.All(g => g.Any(v => selectedVariants.Contains(v.Name)))
- For multi-buy: Keep existing logic (total count == quantity)

Now users must select:
- Size + Color products: Must pick both Size AND Color
- Size only products: Must pick Size only
- Etc.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 02:11:06 +01:00
5ab2c51aa8 Enhancement: Show proper order details instead of GUIDs
- OrderListMenu now shows item summary (e.g., '2x Product Name' or 'Product Name +2 more')
- FormatCart enhanced to show variant selections and multi-buy indicators
- FormatOrder enhanced to show variant names and detailed item breakdown
- Cart now clearly distinguishes between multi-buy bundles and regular items
- Order confirmations now show full product and variant details

Replaced generic GUID displays with human-readable product information for better UX.
2025-10-06 00:46:35 +01:00
6c79c04ebd Fix: Message threading - navigation now sends new messages at bottom
- Changed HandleMainMenu to send new messages instead of editing
- Changed HandleBrowse to send new messages for category navigation
- Changed HandleViewCart to use SendNewCartMessage (already existed)
- Changed HandleViewOrders to send new messages for order list
- Changed HandleViewOrder to send new messages for order details

This ensures the active conversation always appears at the bottom of the chat
instead of mid-thread when users click menu buttons. Provides better UX and
natural conversation flow in Telegram.
2025-10-06 00:44:28 +01:00
c8f22c783d Feature: Add postal address memory with user preference
- Added SavedShippingAddress model to store user addresses
- Added Privacy.SaveShippingAddress preference (null = not asked, true/false = user choice)
- Enhanced checkout flow to offer using saved address if available
- Ask once about saving address, respect user's choice going forward
- Automatically save/not save based on user preference in future orders
- Added menu options: Use Saved Address, Enter New Address, Save Address (Yes/No)
- Enhanced CallbackHandler with save address handlers
- Updated MessageHandler to prompt for save preference on first use

User will only be asked once about saving addresses. Account reset clears preference.
2025-10-06 00:38:47 +01:00
147e96a084 UI: Remove Variants info button and rename Add to Cart to BUY {PRODUCTNAME}
- Removed informational 'Variants: Size: X options, Color: Y options' button
- Renamed 'Add to Cart' button to 'BUY {product.Name}' for clearer UX
- Applied to both multi-buy single item and regular quantity purchase buttons
2025-10-06 00:35:30 +01:00
29d677be72 Fix: Last occurrence of MenuBuilder.VariantSelectionMenu 2025-10-05 23:39:41 +01:00
4cd7a9c61c Fix: Update CallbackHandler to use _menuBuilder instance for VariantSelectionMenu 2025-10-05 23:37:21 +01:00
a4678c919c Fix: Make VariantSelectionMenu an instance method to access _mapper 2025-10-05 23:33:47 +01:00
f1d8bfc317 Fix: VariantSelectionMenu now uses CallbackDataMapper for all callback data to prevent GUID parsing errors 2025-10-05 23:27:12 +01:00
0801fb004c Fix: TeleBot variant callbacks now use CallbackDataMapper to decode short IDs - fixes GUID parsing errors 2025-10-05 22:48:53 +01:00
sysadmin
8075560877 Fix-variant-display-in-API 2025-10-03 20:20:25 +01:00
sysadmin
e5f19f8b83 TeleBot-variant-pricing 2025-10-03 19:36:52 +01:00
32d80e4b54 Fix: Currency display consistency and remove PGP security vulnerability
## Critical Bug Fixes

### Currency Display (£ vs $)
- Fix MenuBuilder.cs: Replace $ with £ for product prices (line 60) and order totals (line 329)
- Fix ProductCarouselService.cs: Replace $ with £ in product captions and multi-buy offers (lines 317, 325)
- Fix CallbackHandler.cs: Replace $ with £ in order confirmation message (line 800)

### Payment Amount Display Bug
- Fix MessageFormatter.cs: Remove flawed crypto detection logic (< 1.0m check)
- Bug: Order for £700 in ETH displayed as "£1.66" instead of "1.66 ETH"
- Root cause: RequiredAmount is always stored as crypto amount, not fiat
- Solution: Always display RequiredAmount with crypto symbol
- Impact: Fixes display for XMR, DOGE, LTC, and large ETH amounts

## Security: Remove PGP Encryption Feature

### Critical Security Issue Resolved
- PGP "encryption" was only Base64 encoding - NOT real encryption
- Shipping addresses stored as easily decoded text
- False sense of security for users

### Changes Made
- Mark EncryptWithPGP method as [Obsolete] in PrivacyService.cs
- Remove PGP encryption logic from order creation (LittleShopService.cs)
- Mark PGP properties as [Obsolete] in UserSession.cs models
- Disable EnablePGPEncryption feature flag in appsettings.json
- Add comments explaining feature removal

### Recommendation
Implement proper PGP encryption using BouncyCastle in future, or keep removed.

## Testing Required
- Verify all prices display with £ symbol
- Verify crypto payments show correct amount format (e.g., "1.66000000 ETH")
- Verify no PGP options appear in UI
- Test order creation without PGP encryption

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 17:36:10 +01:00
16ec41ccca Fix: Replace Quick Buy/Details buttons with single Buy button using short IDs
- ProductCarouselService: Use Buy button with short IDs for products without images
- CallbackHandler: Fix HandleCategory to use Buy button with short IDs
- MenuBuilder: Remove obsolete SingleProductMenu method

This ensures consistent behavior across all product displays and fixes
the Details button that was broken due to GUID format incompatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 17:08:11 +01:00
sysadmin
1d08dd0a52 "Fix-API-URL-use-littleshop-admin-8080" 2025-10-03 16:37:01 +01:00
sysadmin
be074b4446 "Fix-API-URL-to-use-internal-DNS-admin.dark.side" 2025-10-03 16:27:54 +01:00
sysadmin
e3f6ec4bac "Fix-LittleShop-API-URL-for-Docker-network-and-disable-TOR-for-internal-calls" 2025-10-03 16:27:14 +01:00
sysadmin
9192658f7d "Fix-TOR-proxy-host-configuration-in-LittleShop-Client" 2025-10-03 16:22:21 +01:00
sysadmin
28496c9546 "Add-TorSocksHost-configuration" 2025-10-03 16:16:40 +01:00
sysadmin
8fb8c56d9b "Fix-Use-short-IDs-for-product-buttons-and-simplify-to-Buy-button" 2025-10-03 15:48:54 +01:00
sysadmin
694ce15549 "Fix-BUTTON_DATA_INVALID-and-add-multi-buy-buttons" 2025-10-03 15:26:52 +01:00
sysadmin
c961dfa47a "Add-Multi-Buy-section-to-product-editor" 2025-10-03 14:41:00 +01:00
fa5e5fb9fa Fix: Implement selective TOR routing for internal vs external API calls
**Issue**: Order creation failed because TOR proxy was being used for internal
Docker network API calls to littleshop-admin, causing DNS resolution failures.

**Root Cause**:
- All HTTP clients (BotManager, ActivityTracker, ProductCarousel) used
  Socks5HttpHandler.Create() which checked Privacy:EnableTor globally
- TOR gateway can only proxy external traffic (to Telegram API)
- Internal Docker network calls to littleshop-admin failed through TOR

**Solution**:
- Updated BotManagerService to use Socks5HttpHandler.CreateDirect()
- Updated BotActivityTracker to use Socks5HttpHandler.CreateDirect()
- Updated ProductCarouselService to use Socks5HttpHandler.CreateDirect()
- TelegramBotService continues using TOR for external Telegram API
- LittleShop.Client respects LittleShop:UseTor = false setting

**Architecture**:
 External calls (Telegram API) → TOR for privacy
 Internal calls (LittleShop API) → Direct Docker network connection

**Testing**:
- Bot authenticated successfully with LittleShop API (200 OK)
- Telegram Bot API using TOR proxy (socks5://tor-gateway:9050)
- Container: 45eab050eeeca479680966b45742cf140cf7df0ed8e8ab5dc8c9e3e17739c88a

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 13:09:04 +01:00
7e2d8e50db Fix: Prevent 'message not modified' error when browsing products
**Issue**: When users clicked "Browse Products" multiple times, Telegram API
rejected the edit request with "message is not modified" error, causing the
browse functionality to appear broken.

**Root Cause**: HandleBrowse method used EditMessageTextAsync directly, which
throws an exception when the message content is identical.

**Solution**:
- Replaced direct EditMessageTextAsync with SafeEditMessageAsync
- SafeEditMessageAsync catches ApiRequestException for "message is not modified"
- Silently handles duplicate edits without user-facing errors

**Testing**:
- Deployed to production (container: e1467c559ff6)
- Bot running as @Slukdevukbot with TOR enabled
- Categories API confirmed working (3 categories, 10 products)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 12:59:54 +01:00
5a834dcbf8 Fix: Update all TOR proxy configurations to support TorSocksHost
Updated remaining hardcoded 127.0.0.1 references in:
- TelegramBotService.cs (bot token update handler)
- LittleShopService.cs (API client)
- Socks5HttpHandler.cs (factory method signature)

All TOR proxy configurations now respect Privacy:TorSocksHost setting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 12:48:07 +01:00
84172d47a4 Feature: Add TorSocksHost configuration support
Allows TOR proxy host to be configured via Privacy:TorSocksHost setting.
Defaults to 127.0.0.1 if not specified for backward compatibility.

This enables using external TOR gateways in Docker/container environments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 12:45:46 +01:00