Fix regexp for mit.edu narrowing.

(imported from commit 1f82671de8a00ac6fb0fc649ed3f85a8ceaa388f)
This commit is contained in:
Tim Abbott 2013-07-03 18:30:26 -04:00
parent b96f41a991
commit 58536354ad
1 changed files with 1 additions and 1 deletions

View File

@ -696,7 +696,7 @@ class NarrowBuilder(object):
# MIT users expect narrowing to "social" to also show messages to /^(un)*social(.d)*$/
# (unsocial, ununsocial, social.d, etc)
matching_streams = Stream.objects.filter(realm=self.user_profile.realm,
name__iregex=r'"^(un)*%s(.d)*$' % (re.escape(stream.name),))
name__iregex=r'^(un)*%s(.d)*$' % (re.escape(stream.name),))
matching_stream_ids = [matching_stream.id for matching_stream in matching_streams]
recipients = bulk_get_recipients(Recipient.STREAM, matching_stream_ids).values()
return self.pQ(recipient__in=recipients)