Removed bulletin wording from send.py.

This commit is contained in:
Michael Woods
2025-12-25 20:49:43 -05:00
parent b59eafa9ca
commit 159a20f043

View File

@@ -59,23 +59,19 @@ async def send_message(
users_dict = root.get('users', {})
# Prepare recipients
to_list = payload.to
to_tuple = tuple(to_list)
if "ALL" in to_list:
to_tuple = ("ALL",)
to_list = [c.upper() for c in payload.to]
is_to_all = "ALL" in to_list
is_bulletin = "ALL" in to_list
if is_bulletin:
# Bulletin: deliver to all registered users
if is_to_all:
# Deliver to all registered users
valid_recipients = list(users_dict.keys())
failed_recipients = []
else:
# Private message: validate each recipient exists
# Private message validation
valid_recipients = []
failed_recipients = []
for recip in to_list:
if users_dict.get(recip):
if recip in users_dict:
valid_recipients.append(recip)
else:
failed_recipients.append(recip)