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:
@@ -75,6 +75,13 @@ def unread_count(db: Session, conv_id: str) -> int:
|
||||
)
|
||||
|
||||
|
||||
def delete(db: Session, conv: Conversation) -> None:
|
||||
"""Löscht eine Konversation inkl. aller Nachrichten."""
|
||||
db.query(Message).filter(Message.conversation_id == conv.id).delete()
|
||||
db.delete(conv)
|
||||
db.commit()
|
||||
|
||||
|
||||
def mark_all_read(db: Session, conv_id: str) -> None:
|
||||
now = datetime.utcnow()
|
||||
db.query(Message).filter(
|
||||
|
||||
Reference in New Issue
Block a user