Skip to content

Commit

Permalink
Fix handling of empty quoted_content
Browse files Browse the repository at this point in the history
  • Loading branch information
KnugiHK committed Feb 16, 2025
1 parent 1706f3e commit 6dda2eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Whatsapp_Chat_Exporter/ios_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ def messages(db, data, media_folder, timezone_offset, filter_date, filter_chat,
FROM ZWAMESSAGE
WHERE ZSTANZAID LIKE '{message.reply}%'""")
quoted_content = cursor2.fetchone()
message.quoted_data = quoted_content["ZTEXT"] or quoted_content
if quoted_content and "ZTEXT" in quoted_content:
message.quoted_data = quoted_content["ZTEXT"]
else:
message.quoted_data = None
if content["ZMESSAGETYPE"] == 15: # Sticker
message.sticker = True

Expand Down

0 comments on commit 6dda2eb

Please sign in to comment.