minor improvments
This commit is contained in:
parent
2287ddd6f1
commit
db2e6c4f15
14 changed files with 39 additions and 120 deletions
|
|
@ -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}")
|
||||
|
|
|
|||
Loading…
Reference in a new issue