Skip to content

Header date format implementation #134

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions api/ECNQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,22 @@ def __parseHeaders(self) -> list:
message = email.message_from_string(headerString)

headers = []
dateHeaders=[
"QStatus-Updated-Time",
"Status-Updated-Time",
"Edited-Time",
"QTime-Updated-Time",
"Merged-Time",
"Time-Updated-Time",
"Replied-Time",
"Assigned-To-Updated-Time",
"QAssigned-To-Updated-Time",
"Date",
"Sent"
]

benne238 marked this conversation as resolved.
Show resolved Hide resolved
for key in message.keys():
headers.append({"type": key, "content": message[key]})
headers.append({"type": key, "content": self.__getFormattedDate(message[key]) if key in dateHeaders else message[key]})

return headers

Expand Down Expand Up @@ -1331,4 +1345,4 @@ def loadQueues() -> list:
for queue in getValidQueues():
queues.append(Queue(queue))

return queues
return queues