From df4d4beb6cb5a591039729cd76a175dbdcf7859a Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Fri, 13 Dec 2013 17:55:04 -0500 Subject: [PATCH] Add TODO comment to messages_in_narrow_backend (imported from commit 7e80a84fdd8f6ba347bb4ecb0f9238923b825871) --- zerver/views/messages.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zerver/views/messages.py b/zerver/views/messages.py index f6ccb45d1b..2b5a53a466 100644 --- a/zerver/views/messages.py +++ b/zerver/views/messages.py @@ -655,6 +655,10 @@ def messages_in_narrow_backend(request, user_profile, # Note that this function will only work on messages the user # actually received + # TODO: We assume that the narrow is a search. For now this works because + # the browser only ever calls this function for searches, since it can't + # apply that narrow operator itself. + query = select([column("message_id"), column("subject"), column("rendered_content")], and_(column("user_profile_id") == literal(user_profile.id), column("message_id").in_(msg_ids)),