From f623eddc2387ac873759bde0e102d48fb808d809 Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Thu, 19 Jun 2025 23:13:28 +0800 Subject: [PATCH] Fix incorrect SQL statement The incorrect SQL statement prevents retrieval of media information. --- Whatsapp_Chat_Exporter/android_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Whatsapp_Chat_Exporter/android_handler.py b/Whatsapp_Chat_Exporter/android_handler.py index 45c73c8..d8e2de0 100644 --- a/Whatsapp_Chat_Exporter/android_handler.py +++ b/Whatsapp_Chat_Exporter/android_handler.py @@ -576,7 +576,7 @@ def _get_media_count(cursor, filter_empty, filter_date, filter_chat): def _get_media_cursor_legacy(cursor, filter_empty, filter_date, filter_chat): """Get cursor for legacy media database schema.""" - empty_filter = get_cond_for_empty(filter_empty, "key_remote_jid", "broadcast") + empty_filter = get_cond_for_empty(filter_empty, "messages.key_remote_jid", "messages.needs_push") date_filter = f'AND messages.timestamp {filter_date}' if filter_date is not None else '' include_filter = get_chat_condition( filter_chat[0], True, ["messages.key_remote_jid", "remote_resource"], "jid", "android")