minor improvments

This commit is contained in:
Andrew Gundersen 2020-12-15 15:30:42 -06:00
commit db2e6c4f15
14 changed files with 39 additions and 120 deletions

View file

@ -22,6 +22,10 @@ async def messenger():
while not mailbox.outbox.empty():
message = mailbox.outbox.get()
# Assert mailbox for target.
if message.target not in mailroom.subs:
mailroom.create_mailbox(message.target)
# Get mailbox of target and put mail there.
target_mailbox = mailroom.get_mailbox(message.target)
print(f"{mailbox.name} -> {target_mailbox.name}: {message.text}")