addressee: Accept a realm object in legacy_build.

This fixes a bug where the internal_prep_message code path would
incorrectly ignore the `realm` that was passed into it.  As a result,
attempts to send messages using the system bots with this code path
would crash.

As a sidenote, we really need to make our test system consistent with
production in terms of whether the user's realm is the same as the
system realm.
This commit is contained in:
Tim Abbott
2017-09-25 12:55:02 -07:00
parent cc6d35c0f2
commit c11b1623dd
2 changed files with 8 additions and 4 deletions

View File

@@ -1643,7 +1643,8 @@ def internal_prep_message(realm, sender_email, recipient_type_name, recipients,
sender,
recipient_type_name,
parsed_recipients,
subject)
subject,
realm=realm)
return _internal_prep_message(
realm=realm,