Skip to content

Commit

Permalink
Subject key added to the initial message
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Daniel Bennett committed Oct 16, 2020
1 parent 92e11f2 commit d2ad5bb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions api/ECNQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def __parseSections(self) -> list:
contentEnd = len(self.__rawItem) - 1

#directoryInfo = {"type": "directoryInformation"}
initialMessageContent = []
initialMessageSection = True

# Delimiter info
Expand Down Expand Up @@ -419,10 +418,11 @@ def __initialMessageParsing(self, content: list) -> dict:
Returns:
dictionary: "type": "initial_message",
"datetime": utcdate,
"from_name": fromName,
"from_email": userEmail,
"from_name": from_name,
"from_email": user_email,
"to": [{email, name}],
"cc": [{email, name}],
"subject": initial_message_subject
"content": ["message_content"]
"""
initialMessageDictionary = {}
Expand Down Expand Up @@ -467,7 +467,7 @@ def __initialMessageParsing(self, content: list) -> dict:
"email": ccRecipients[1]}
)

#rawMessageContent = self.__rawItem[startLine : endLine]
initialMessageDictionary["subject"] = self.__getMostRecentHeaderByType("Subject")

# Removes unecessary newlines from the begining and the end of the initial message
initialMessageDictionary["content"] = self.__getFormattedMessageContent(content)
Expand Down Expand Up @@ -938,4 +938,10 @@ def getQueues() -> list:
if isDirectory and isValid:
queues.append(Queue(file))

return queues
return queues
if __name__ == "__main__":
item = Item("ce", 100)
print()
# for queue in getQueues():
# for item in queue.items:
# print(f"${item.queue} ${item.number}")

0 comments on commit d2ad5bb

Please sign in to comment.