zulip/zerver/views
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
..
__init__.py views: Rename __init__.py to zerver.views.registration. 2017-01-08 16:21:15 -08:00
alert_words.py tidying: Combine multiple 'import typing' lines onto one line. 2017-07-16 16:43:21 -07:00
attachments.py Add support for managing and deleting attachments. 2017-02-16 23:44:44 -08:00
auth.py auth.py: Add config_error page for misconfigured github/google auth. 2017-08-16 10:05:19 -07:00
compatibility.py mypy: Add check for parse_user_agent returning None in compatibility.py. 2017-07-08 10:49:42 -07:00
custom_profile_fields.py custom_profile: Prevent bot users from accessing endpoint. 2017-07-31 13:08:06 -07:00
email_mirror.py email mirror: Fix mypy annotation error. 2017-04-24 22:01:48 -07:00
events_register.py mypy: Refer to default_stream in if statement, allowing type inference. 2017-08-07 21:27:50 -07:00
home.py mypy: Annotate sent_time_in_epoch_seconds taking Optional[UserMessage]. 2017-08-15 17:50:18 -07:00
hotspots.py hotspots: Prevent bot users from accessing endpoint. 2017-07-31 13:08:06 -07:00
integrations.py context_processors.py: Add flag for whether page is help center. 2017-08-15 12:15:21 -07:00
invite.py invites: Migrate to non-legacy API format. 2017-07-31 13:08:06 -07:00
messages.py Support non-search queries in /json/messages/matches_narrow. 2017-08-23 01:07:57 -07:00
muting.py Implemented API routes for muting/unmuting a topic 2017-03-15 16:19:00 -07:00
pointer.py mypy: Convert zerver/views to use typing.Text. 2016-12-26 13:43:09 -08:00
presence.py views/presence: Refactor get_user_profile_by_email -> get_user. 2017-05-22 16:43:08 -07:00
push_notifications.py push_notifications: Add human users only decorator. 2017-07-31 13:08:06 -07:00
reactions.py reactions: Fix reacting to messages on streams you're not subscribed to. 2017-03-22 20:22:13 -07:00
realm.py realm: Add clear error message for too-long realm name. 2017-08-22 22:04:52 -07:00
realm_domains.py realm_domains: Restructure library for getting realm domains. 2017-04-28 21:11:56 -07:00
realm_emoji.py realm_emoji.py: Allow an user to delete an emoji uploaded by them. 2017-05-29 20:21:25 -07:00
realm_filters.py Change domain to realm_id in bugdown and realm filter dicts and caches. 2017-01-03 16:25:20 -08:00
realm_icon.py Add size limit for uploading user avatars and realm icons. 2017-03-07 22:13:01 -08:00
registration.py auth: Improve robustness of not sending duplicate login emails. 2017-08-22 16:26:30 -07:00
report.py report: Fix path to find webpack bundle source maps. 2017-08-01 08:55:45 -07:00
streams.py Replace adddressee.for_email() with for_user_profile(). 2017-08-22 10:42:15 -07:00
test_emails.py emails: Link to organization getting started guide in followup_day1. 2017-08-22 14:26:17 -07:00
tutorial.py internal_send_message: Make realm argument mandatory. 2017-01-21 21:37:30 -08:00
typing.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
unsubscribe.py emails: Rename clear_followup_emails_queue. 2017-07-17 16:05:38 -07:00
upload.py uploads: Remove legacy /json/upload_file endpoint. 2017-07-31 13:08:06 -07:00
user_settings.py settings: Migrate main settings-change code to API. 2017-07-31 13:08:06 -07:00
users.py do_deactivate_user: Add acting user to RealmAuditLog. 2017-08-16 16:23:41 -07:00
zephyr.py bots: Move zephyr-related files to api/integrations/zephyr/. 2017-05-26 15:07:02 -07:00