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
This commit is contained in:
2026-03-13 15:04:15 +01:00
parent b0c6ba44de
commit 7a008470ef
5 changed files with 78 additions and 2 deletions

View File

@@ -101,6 +101,14 @@ class MCMApiClient:
async def get_contacts(self) -> list[dict[str, Any]]:
return await self._get("/contacts")
async def delete_conversation(self, conv_id: str) -> None:
async with httpx.AsyncClient(timeout=10.0, follow_redirects=True) as client:
resp = await client.delete(
self._base + f"/conversations/{conv_id}",
headers=self._headers,
)
resp.raise_for_status()
async def get_telegram_qr(self, contact_id: str) -> bytes:
"""QR-Code PNG-Bytes für einen Kontakt abrufen."""
async with httpx.AsyncClient(timeout=10.0, follow_redirects=True) as client: