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

@@ -37,7 +37,7 @@ class WhatsAppChannel(BaseChannel):
return {"success": False, "channel_message_id": None, "error": "WhatsApp not configured"}
# chatId: Telefonnummer ohne + gefolgt von @c.us, z.B. "4917612345678@c.us"
chat_id = recipient.lstrip("+") + "@c.us"
chat_id = recipient.replace("@c.us", "").lstrip("+") + "@c.us"
url = f"{self._base_url}/sendMessage/{self._token}"
body: dict[str, Any] = {"chatId": chat_id, "message": text}
if reply_to_id: