add todos

This commit is contained in:
Sean Breckenridge 2024-05-30 19:34:40 -07:00
parent 06936aa560
commit 118b58ee68

View file

@ -190,11 +190,13 @@ def _parse_mms(path: Path) -> Iterator[Res[MMS]]:
for mxml in tr.findall('mms'): for mxml in tr.findall('mms'):
dt = mxml.get('date') dt = mxml.get('date')
dt_readable = mxml.get('readable_date') dt_readable = mxml.get('readable_date')
message_type = mxml.get('msg_box')
# TODO: split these by `~`?
who = mxml.get('contact_name') who = mxml.get('contact_name')
if who is not None and who in UNKNOWN: if who is not None and who in UNKNOWN:
who = None who = None
phone_number = mxml.get('address') phone_number = mxml.get('address')
message_type = mxml.get('msg_box')
if dt is None or dt_readable is None or message_type is None or phone_number is None: if dt is None or dt_readable is None or message_type is None or phone_number is None:
mxml_str = etree.tostring(mxml).decode('utf-8') mxml_str = etree.tostring(mxml).decode('utf-8')
@ -204,13 +206,8 @@ def _parse_mms(path: Path) -> Iterator[Res[MMS]]:
content: List[MMSContentPart] = [] content: List[MMSContentPart] = []
# seems pointless, but will leave here as its how the spec describes it # TODO: use this to extract out which person actually sent this
# The addresses here are also included in 'addresses' (which also doesnt # message_type does not accurately encode that when there are multiple people
# include your own address), as well as possibly contains a contact name
#
# the only difference is its a single field (split by '~' it seems?) when
# using the top-level attributes instead of 'addresses', but seems to be no
# reason to use this
# #
# addresses = [] # addresses = []
# for addr_parent in mxml.findall('addrs'): # for addr_parent in mxml.findall('addrs'):