Commit Graph

20 Commits

Author SHA1 Message Date
2b15a99dc4 fix: conv_id bei Cursor-Bewegung sofort setzen (RowHighlighted) 2026-03-17 15:03:22 +01:00
5f9d6b327b fix: Telegram-Polling-Task sauber canceln + WhatsApp CancelledError beim Shutdown unterdrücken 2026-03-17 15:01:38 +01:00
b880cabcde fix: WhatsApp channel_conv_id als nummer@c.us normalisieren beim Senden 2026-03-17 14:57:24 +01:00
2324ffd714 fix: ModalScreen Import in main_screen.py 2026-03-13 15:05:46 +01:00
7a008470ef fix: WhatsApp @c.us Doppel-Suffix + Chat löschen in TUI
- WhatsApp send: @c.us wird vor dem Anhängen entfernt (verhindert 4915..@c.us@c.us)
- DELETE /api/v1/conversations/{id}: löscht Konversation + alle Nachrichten
- TUI: Taste D öffnet Bestätigungsdialog zum Löschen des aktuellen Chats
2026-03-13 15:04:15 +01:00
b0c6ba44de fix: Rich-Markup-Fehler bei leeren Styles + Telefonnummer-Normalisierung
- _render_message: leeren style-Tag vermieden (MarkupError bei inbound-Msgs)
- Nachrichtentext: eckige Klammern werden escaped (kein Markup-Injection)
- get_by_phone: sucht +49xxx und 49xxx gleichzeitig (Green API liefert ohne +)
2026-03-13 14:58:04 +01:00
0f73341c8b fix: WhatsApp incomingWebhook beim Start automatisch aktivieren
Green-API-Instanz hatte incomingWebhook=no → keine Nachrichten in Queue.
_ensure_incoming_enabled() setzt incomingWebhook+outgoingWebhook=yes beim Start.
2026-03-13 14:49:09 +01:00
18ad0735ef feat: Telegram QR-Code Invite-Link + WhatsApp Empfang-Fix
Telegram:
- /start <contact_id> Deep-Link Handler: verknüpft Kontakt automatisch mit chat_id
- QR-Code Endpunkt GET /api/v1/contacts/{id}/telegram-qr (PNG)
- TUI: Taste T öffnet QR-Code im Browser (HTML mit eingebettetem PNG)
- config.py + .env.example: TELEGRAM_BOT_USERNAME=mcm_bot
- qrcode[pil] zu requirements.txt hinzugefügt

WhatsApp:
- receiveTimeout 5→3s, HTTP-Timeout 8s → verhindert Polling-Overlap
2026-03-13 14:45:06 +01:00
73619fbc9c feat: /todo command, breitere Sidebar, TODO.md gitignored
- Neuer Claude-Code Slash-Command /todo zur Pflege einer lokalen TODO-Liste
- TODO.md in .gitignore aufgenommen (bleibt lokal)
- TUI-Sidebar breiter: width 28→40 (min 22→30, max 40→55)
2026-03-13 14:24:53 +01:00
d7887ae0c9 fix: WebSocket-URL in Browser nutzt echte IP statt 0.0.0.0 2026-03-13 14:19:56 +01:00
23fb37cb1a fix: textual-serve als Web-Frontend statt python -m textual serve
textual serve (python -m textual) startete immer die eingebaute Demo.
Lösung: textual-serve Paket (v1.1.3) mit eigenem serve_tui.py Einstiegspunkt.
Pro Browser-Verbindung wird tui_standalone.py als eigener Subprocess gestartet.

Starten: python serve_tui.py --host 0.0.0.0 --port 8001
2026-03-13 14:12:25 +01:00
3177146267 fix: tui_standalone.py gibt Klasse statt Instanz zurück (textual serve erwartet Factory) 2026-03-13 14:06:07 +01:00
9046708015 fix: sauberer Shutdown (Telegram Updater, CancelledError), WhatsApp-Polling auf 5s 2026-03-13 14:02:45 +01:00
d67479309d fix: Telegram idle() entfernt (PTB v21), WhatsApp-Polling-Intervall auf 10s erhöht 2026-03-13 13:59:17 +01:00
4c45c8b17b fix: Telegram-Filter für python-telegram-bot v21 korrigiert 2026-03-13 13:57:01 +01:00
4c5f6a16a7 docs: MCM-Logo hochgeladen 2026-03-13 12:43:51 +01:00
cc2e1214db docs: README mit Logo, Installation, API-Übersicht und Projektstruktur 2026-03-13 12:41:25 +01:00
6eb27a62b1 feat: Multi-User-Unterstützung mit JWT-Authentifizierung
- User-Modell (username, password_hash, role admin/user, is_active)
- Standard-Admin-Benutzer wird beim ersten Start automatisch angelegt
- JWT-Tokens (HS256) für Benutzer-Sessions, konfigurierbare Ablaufzeit
- API-Key bleibt für service-to-service-Calls (backward-compatible)
- POST /api/v1/auth/login → JWT-Token
- GET  /api/v1/auth/me   → aktueller Benutzer
- CRUD /api/v1/users/    → Benutzerverwaltung (nur Admin)
- TUI zeigt Login-Screen beim Start; nach Erfolg → MainScreen
- Passwort-Hashing mit bcrypt (python-jose für JWT)
2026-03-04 20:55:13 +01:00
0e2a8a6bc0 feat: TUI als Browser-App via textual serve
TUI von direkten Service-Importen auf httpx API-Calls umgestellt.
Neue tui/api_client.py als schlanker async HTTP-Client. Background-
Worker pollt API alle 5s für Echtzeit-Updates. Neuer tui_standalone.py
Entry-Point für 'textual serve --port 8001 tui_standalone.py'.
2026-03-04 20:45:55 +01:00
7f3b4768c3 Initial MCM project: FastAPI + Textual TUI unified messenger
MultiCustomerMessenger supporting Telegram (python-telegram-bot),
WhatsApp (Green API) and SMS (python-gsmmodem-new). REST API with
Bearer-token auth, SQLAlchemy models for MariaDB, APScheduler for
background polling, and Textual TUI running in same asyncio event-loop.
2026-03-03 14:43:19 +01:00