zulip/zerver
Steve Howell 2b4faaa847 Support non-search queries in /json/messages/matches_narrow.
For filters like has:link, where the web app doesn't necessarily
want to guess whether incoming messages meet the criteria of the
filter, the server is asked to query rows that match the query.

Usually these queries are search queries, which have fields for
content_matches and subject_matches.  Our logic was handling those
correctly.

Non-search queries were throwing an exception related to tuple
unpacking.  Now we recognize when those fields are absent and
do the proper thing.

There are probably situations where the web app should stop hitting
this endpoint and just use its own filters.  We are making the most
defensive fix first.

Fixes #6118
2017-08-23 01:07:57 -07:00
..
fixtures generate_test_data: Fix typo in configuration. 2017-08-01 23:45:57 -07:00
lib onboarding.py: Add link to getting-your-organization-started-with-zulip. 2017-08-22 14:26:17 -07:00
management mypy: Fix an annotation. 2017-08-22 17:39:24 -07:00
migrations database: Add database index for wildcard mentions. 2017-08-16 13:28:04 -07:00
templatetags tidying: Combine multiple 'import typing' lines onto one line. 2017-07-16 16:43:21 -07:00
tests Support non-search queries in /json/messages/matches_narrow. 2017-08-23 01:07:57 -07:00
tornado mypy: Remove superfluous older 'type: ignore' annotations. 2017-08-08 11:27:51 -07:00
views Support non-search queries in /json/messages/matches_narrow. 2017-08-23 01:07:57 -07:00
webhooks linter: Add trailing whitespace check for json files. 2017-08-15 09:28:11 -07:00
worker mypy: Set assign_queue() parameter queue_type to not be Optional. 2017-08-07 21:27:50 -07:00
__init__.py caching: Add configuration class for post-migration cache flushing. 2016-10-27 23:26:34 -07:00
apps.py Add notifications on new logins to Zulip. 2017-03-25 16:50:52 -07:00
context_processors.py auth.py: Add config_error page for misconfigured github/google auth. 2017-08-16 10:05:19 -07:00
decorator.py decorator: Fix SOCKET requests being broken with REALMS_HAVE_SUBDOMAINS. 2017-08-15 19:22:17 -07:00
filters.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
forms.py registration: Password should be required in form. 2017-08-09 13:44:57 -07:00
logging_handlers.py logging_handlers: Fix tracebacks being emailed in subject lines. 2017-04-25 18:55:11 -07:00
middleware.py mypy: Correct 2 type annotations in zerver/middleware.py. 2017-08-15 17:50:18 -07:00
models.py mypy: Reorder and annotate variables around if statements. 2017-08-15 17:50:18 -07:00
signals.py auth: Improve robustness of not sending duplicate login emails. 2017-08-22 16:26:30 -07:00
static_header.txt Update static_header.txt with new license information. 2016-08-13 00:37:21 -07:00
storage.py pep8: Add compliance with rule E261 to storage.py. 2017-05-07 23:21:50 -07:00