mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-27 16:24:53 +00:00
Align vCard UX with iOS
This commit is contained in:
@@ -7,6 +7,7 @@ import hmac
|
|||||||
import shutil
|
import shutil
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from mimetypes import MimeTypes
|
from mimetypes import MimeTypes
|
||||||
|
from markupsafe import escape as htmle
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from base64 import b64decode, b64encode
|
from base64 import b64decode, b64encode
|
||||||
from Whatsapp_Chat_Exporter.data_model import ChatStore, Message
|
from Whatsapp_Chat_Exporter.data_model import ChatStore, Message
|
||||||
@@ -658,11 +659,11 @@ def vcard(db, data, media_folder, filter_date, filter_chat):
|
|||||||
with open(file_path, "w", encoding="utf-8") as f:
|
with open(file_path, "w", encoding="utf-8") as f:
|
||||||
f.write(row["vcard"])
|
f.write(row["vcard"])
|
||||||
message = data[row["key_remote_jid"]].messages[row["message_row_id"]]
|
message = data[row["key_remote_jid"]].messages[row["message_row_id"]]
|
||||||
message.data = media_name + \
|
message.data = "This media include the following vCard file(s):<br>" \
|
||||||
"The vCard file cannot be displayed here, " \
|
f'<a href="{htmle(file_path)}">{htmle(media_name)}</a>'
|
||||||
f"however it should be located at {file_path}"
|
|
||||||
message.mime = "text/x-vcard"
|
message.mime = "text/x-vcard"
|
||||||
message.meta = True
|
message.meta = True
|
||||||
|
message.safe = True
|
||||||
print(f"Processing vCards...({index + 1}/{total_row_number})", end="\r")
|
print(f"Processing vCards...({index + 1}/{total_row_number})", end="\r")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user