mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-25 15:31:38 +00:00
Fix the MIME type for vCards
This commit is contained in:
@@ -249,7 +249,7 @@ def vcard(db, data):
|
|||||||
data[row[1]]["messages"][row[0]]["data"] = row[3] + \
|
data[row[1]]["messages"][row[0]]["data"] = row[3] + \
|
||||||
"{ The vCard file cannot be displayed here, however it " \
|
"{ The vCard file cannot be displayed here, however it " \
|
||||||
"should be located at " + file_path + "}"
|
"should be located at " + file_path + "}"
|
||||||
data[row[1]]["messages"][row[0]]["mime"] = "x-vcard"
|
data[row[1]]["messages"][row[0]]["mime"] = "text/x-vcard"
|
||||||
print(f"Gathering vCards...({index + 1}/{total_row_number})", end="\r")
|
print(f"Gathering vCards...({index + 1}/{total_row_number})", end="\r")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,8 +74,7 @@ def messages(db, data):
|
|||||||
fallback = None
|
fallback = None
|
||||||
else:
|
else:
|
||||||
fallback = None
|
fallback = None
|
||||||
data[content[0]]["messages"][content[1]
|
data[content[0]]["messages"][content[1]]["sender"] = name or fallback
|
||||||
]["sender"] = name or fallback
|
|
||||||
else:
|
else:
|
||||||
data[content[0]]["messages"][content[1]]["sender"] = None
|
data[content[0]]["messages"][content[1]]["sender"] = None
|
||||||
if content[5] == 6:
|
if content[5] == 6:
|
||||||
@@ -161,8 +160,7 @@ def media(db, data, media_folder):
|
|||||||
# data[content[0]]["messages"][content[1]]["data"] = "{The media is missing}"
|
# data[content[0]]["messages"][content[1]]["data"] = "{The media is missing}"
|
||||||
# data[content[0]]["messages"][content[1]]["mime"] = "media"
|
# data[content[0]]["messages"][content[1]]["mime"] = "media"
|
||||||
# else:
|
# else:
|
||||||
data[content[0]]["messages"][content[1]
|
data[content[0]]["messages"][content[1]]["data"] = "{The media is missing}"
|
||||||
]["data"] = "{The media is missing}"
|
|
||||||
data[content[0]]["messages"][content[1]]["mime"] = "media"
|
data[content[0]]["messages"][content[1]]["mime"] = "media"
|
||||||
if content[6] is not None:
|
if content[6] is not None:
|
||||||
data[content[0]]["messages"][content[1]]["caption"] = content[6]
|
data[content[0]]["messages"][content[1]]["caption"] = content[6]
|
||||||
@@ -202,7 +200,7 @@ def vcard(db, data):
|
|||||||
data[row[2]]["messages"][row[1]]["data"] = row[3] + \
|
data[row[2]]["messages"][row[1]]["data"] = row[3] + \
|
||||||
"{ The vCard file cannot be displayed here, however it " \
|
"{ The vCard file cannot be displayed here, however it " \
|
||||||
"should be located at " + file_path + "}"
|
"should be located at " + file_path + "}"
|
||||||
data[row[2]]["messages"][row[1]]["mime"] = "x-vcard"
|
data[row[2]]["messages"][row[1]]["mime"] = "text/x-vcard"
|
||||||
data[row[2]]["messages"][row[1]]["media"] = True
|
data[row[2]]["messages"][row[1]]["media"] = True
|
||||||
print(f"Gathering vCards...({index + 1}/{total_row_number})", end="\r")
|
print(f"Gathering vCards...({index + 1}/{total_row_number})", end="\r")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user