messages: Optimize check_message using recent denormalization.

This commit is contained in:
Mateusz Mandera
2019-12-05 22:34:28 +01:00
committed by Tim Abbott
parent 1c5461663f
commit 792fbeea24
2 changed files with 5 additions and 5 deletions

View File

@@ -2356,7 +2356,7 @@ def check_message(sender: UserProfile, client: Client, addressee: Addressee,
stream = addressee.stream()
assert stream is not None
recipient = get_stream_recipient(stream.id)
recipient = stream.recipient
# This will raise JsonableError if there are problems.
validate_sender_can_write_to_stream(