mirror of https://github.com/zulip/zulip.git
search: Include history for is:resolved queries.
The previous logic assumed that all `is:` operators were those like `is:muted` or `is:starred`, which depend on personal data.
This commit is contained in:
parent
ffb182fb25
commit
ba92cd8b23
|
@ -903,7 +903,7 @@ def ok_to_include_history(
|
|||
# that's a property on the UserMessage table. There cannot be
|
||||
# historical messages in these cases anyway.
|
||||
for term in narrow:
|
||||
if term["operator"] == "is":
|
||||
if term["operator"] == "is" and term["operand"] not in {"resolved"}:
|
||||
include_history = False
|
||||
|
||||
return include_history
|
||||
|
|
|
@ -1103,7 +1103,7 @@ class IncludeHistoryTest(ZulipTestCase):
|
|||
dict(operator="channels", operand="public"),
|
||||
dict(operator="is", operand="resolved"),
|
||||
]
|
||||
self.assertFalse(ok_to_include_history(narrow, user_profile, False))
|
||||
self.assertTrue(ok_to_include_history(narrow, user_profile, False))
|
||||
|
||||
# simple True case
|
||||
narrow = [
|
||||
|
|
Loading…
Reference in New Issue