zulip/zerver
Steve Howell 47bcedbc1b Fix server searches for is:mentioned and is:alerted.
Before this change, server searches for both
`is:mentioned` and `is:alerted` would return all messages
where the user is specifically mentioned (but not
at-all mentions).

Now we follow the JS semantics:

    is:mentioned -- all mentions, including wildcards
    is:alerted  -- has an alert word

Here is one relevant JS snippet:

        } else if (operand === 'mentioned') {
            return message.mentioned;
        } else if (operand === 'alerted') {
            return message.alerted;

And here you see that `mentioned` is OR'ed over both mention flags:

    message.mentioned = convert_flag('mentioned') || convert_flag('wildcard_mentioned');

The `alerted` flag on the JS side is a simple mapping:

    message.alerted = convert_flag('has_alert_word');

Fixes #5020
2017-08-16 11:29:12 -07:00
..
fixtures generate_test_data: Fix typo in configuration. 2017-08-01 23:45:57 -07:00
lib bugdown: Fix mypy error with empty return. 2017-08-16 11:29:12 -07:00
management management: Log number of soft deactivated/reactivated users. 2017-08-15 22:05:19 -07:00
migrations reactions: Store the emoji codepoint in the database. 2017-08-15 09:29:27 -07:00
templatetags tidying: Combine multiple 'import typing' lines onto one line. 2017-07-16 16:43:21 -07:00
tests Fix server searches for is:mentioned and is:alerted. 2017-08-16 11:29:12 -07:00
tornado mypy: Remove superfluous older 'type: ignore' annotations. 2017-08-08 11:27:51 -07:00
views Fix server searches for is:mentioned and is:alerted. 2017-08-16 11:29:12 -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 emails: Add to_user_id argument to send_email. 2017-07-16 16:56:39 -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