From 55bc62cdc17a8e3f0ba917130dbde77cb613b52b Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Tue, 20 Jun 2023 13:49:22 +0800 Subject: [PATCH] Add fallback to Android contact name just like commit 5f6b764 --- Whatsapp_Chat_Exporter/extract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Whatsapp_Chat_Exporter/extract.py b/Whatsapp_Chat_Exporter/extract.py index ccf2f26..6ee7c27 100644 --- a/Whatsapp_Chat_Exporter/extract.py +++ b/Whatsapp_Chat_Exporter/extract.py @@ -155,7 +155,7 @@ def contacts(db, data): total_row_number = c.fetchone()[0] print(f"Processing contacts...({total_row_number})") - c.execute("""SELECT jid, display_name FROM wa_contacts; """) + c.execute("""SELECT jid, COALESCE(display_name, wa_name) as display_name FROM wa_contacts; """) row = c.fetchone() while row is not None: data[row["jid"]] = ChatStore(Device.ANDROID, row["display_name"])