zulip/zerver/views
Steve Howell 0f7628280f narrow: Handle spurious emails in pm-with searches.
If cordelia searches on pm-with:iago@zulip.com,cordelia@zulip.com,
we now properly treat that the same way as pm-with:iago@zulip.com.

Before this fix, the query would initially go through the
huddle code path.  The symptom wasn't completely obvious, as
eventually a deeper function would return a recipient id
corresponding to a single PM with @iago@zulip.com, but we would
only get messages where iago was the recipient, and not any
messages where he was the sender to cordelia.

I put the helper function for this in zerver/lib/addressee, which
is somewhat speculative.  Eventually, we'll want pm-with queries
to allow for user ids, and I imagine there will be some shared
logic with other Addressee code in terms of how we handle these
strings.  The way we deal with lists of emails/users for various
endpoints is kind of haphazard in the current code, although
granted it's mostly just repeating the same simple patterns.  It
would be nice for some of this code to converge a bit.  This
affects new messages, typing indicators, search filters, etc.,
and some endpoints have strange legacy stuff like supporting
JSON-encoded lists, so it's not trivial to clean this up.

Tweaked by tabbott to add some additional tests.
2018-10-12 10:18:30 -07:00
..
__init__.py views: Rename __init__.py to zerver.views.registration. 2017-01-08 16:21:15 -08:00
alert_words.py alert words: Return the updated list when adding/removing words. 2018-07-13 01:01:00 +05:30
archive.py archives: Add endpoint to fetch topic history of web public streams. 2018-07-14 09:51:37 +05:30
attachments.py attachments: Send events for attachment updates. 2018-05-04 16:22:27 -07:00
auth.py mobile: Make otp_encrypt_api_key accept API keys. 2018-08-08 16:45:40 -07:00
compatibility.py views: Change use of typing.Text to str. 2018-04-23 18:51:23 -07:00
custom_profile_fields.py events: Convert custom user field value to json object on update event. 2018-08-22 22:45:08 -07:00
email_log.py email_log: Only import Django test client when using it. 2018-08-08 14:19:42 -07:00
email_mirror.py mypy: Use Python 3 type syntax in zerver/views/email_mirror.py. 2017-12-28 07:26:44 -05:00
events_register.py views: Change use of typing.Text to str. 2018-04-23 18:51:23 -07:00
home.py models: Move billing models from zilencer to corporate. 2018-10-11 14:54:29 -07:00
hotspots.py views: Fix imports of REQ/has_request_variables from the wrong place. 2017-10-27 15:07:31 -07:00
integrations.py templates: Merge Help and API doc main into documentation_main. 2018-08-27 20:19:24 -02:30
invite.py invite: Make inviting new users inaccessible for guest users. 2018-06-16 06:33:13 -07:00
messages.py narrow: Handle spurious emails in pm-with searches. 2018-10-12 10:18:30 -07:00
muting.py muting: Correct agrammatical error message. 2018-08-27 14:12:03 -07:00
pointer.py do_update_pointer: Pass client object from callers. 2018-08-01 16:40:15 -07:00
presence.py tornado: Split get_events_backend into two functions. 2018-07-30 12:28:31 -07:00
push_notifications.py views: Change use of typing.Text to str. 2018-04-23 18:51:23 -07:00
reactions.py reactions: Allow using emoji_name for removing reactions. 2018-07-11 19:41:43 +05:30
realm.py models: Rename Realm.restricted_to_domain field. 2018-07-31 09:28:33 -07:00
realm_domains.py views: Change use of typing.Text to str. 2018-04-23 18:51:23 -07:00
realm_emoji.py emoji: Show emoji names with spaces on front-end. 2018-08-04 09:40:52 -07:00
realm_filters.py views: Change use of typing.Text to str. 2018-04-23 18:51:23 -07:00
realm_icon.py zerver/views: Use python 3 syntax for typing. 2017-10-26 21:58:22 -07:00
registration.py urls: Separate endpoint for signup and new realm email confirm. 2018-08-26 22:53:57 -07:00
report.py mypy: Set local_partial_types = True. 2018-05-21 22:41:00 -07:00
storage.py mypy: Migrate views/storage.py to python3.5 type annotations. 2018-03-12 11:23:30 -07:00
streams.py i18n: Fix hard-to-translate notification bot string. 2018-08-09 08:37:23 -07:00
submessage.py submessages: Just send content for submessage events. 2018-05-30 13:53:11 -07:00
thumbnail.py thumbnails: Change thumbnail size to be 300px. 2018-10-11 15:44:47 -07:00
tutorial.py mypy: Use Python 3 syntax for typing in views/tutorial.py. 2017-12-08 18:34:26 -08:00
typing.py views: Change use of typing.Text to str. 2018-04-23 18:51:23 -07:00
unsubscribe.py requirements: Upgrade pyflakes to 2.0.0. 2018-05-24 11:31:36 -07:00
upload.py upload: Remove unnecessary use of has_request_variables. 2018-07-01 01:47:03 -07:00
user_groups.py api: Add an endpoint for listing the user groups in realm. 2018-08-27 16:56:23 -07:00
user_settings.py user_settings: Compare new stripped email with old email. 2018-10-11 15:55:32 -07:00
users.py avatar: Allow API authentication for /avatar/ routes. 2018-10-11 15:52:29 -07:00
zephyr.py users: Get all API keys via wrapper method. 2018-08-08 16:35:17 -07:00