Have exclude_topic_mutes() accept a stream id.

We want to convert stream names to stream ids as close
to the "edges" of our system as possible, so we let our
caller do the work of finding the stream id for a stream
narrow.
This commit is contained in:
Steve Howell
2017-09-17 11:19:12 -07:00
committed by Tim Abbott
parent 7b2340decd
commit f13cb94d84
3 changed files with 20 additions and 11 deletions

View File

@@ -298,6 +298,8 @@ def build_custom_checkers(by_lang):
('zerver/lib/actions.py', 'get_stream(signups_stream, admin_realm)'),
# Here we need get_stream to access streams you've since unsubscribed from.
('zerver/views/messages.py', 'stream = get_stream(operand, self.user_profile.realm)'),
# Use stream_id to exclude mutes.
('zerver/views/messages.py', 'stream_id = get_stream(stream_name, user_profile.realm).id'),
]),
'description': 'Please use access_stream_by_*() to fetch Stream objects',
},