mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
The check for empty recipient lists (the "message_to" argument) does not belong in check_message. As we implement support for sending messages by user IDs (see #9474), we will be extending much of the existing code in Addressee.legacy_build that validates recipient lists. Therefore, Addressee.legacy_build is a much more apt area to check for empty recipient lists. Also, Addressee.for_private and Addressee.for_user_ids also need to do their own validation, since not everything goes through Addressee.legacy_build. It is okay to simply throw a 500 in these cases because we expect that callers will be doing their own validation for calls that don't go through Addressee.legacy_build(). This commit is a part of our efforts surrounding #9474.
228 KiB
228 KiB