zulip/zerver
m-e-l-u-h-a-n 1b8a5a3344 markdown: Refactor backend logic for handling user mention.
Backend logic for handling user mention was cluttered
because it was handled at two stages first in
get_possible_mentions_info while fetching mention data
based on the messsage and then later in UserMentionPattern
which handles processing of text for mention.

Ideally UserMentionPattern should depend on
get_possible_mentions_info only for data but there was a
shared logic between these two that made it hard to debug
any possible bugs.

Updates in this commit make both of these functions
coherent in terms of logic and also add appropiate
comments to improve readability of these functions.

There was also a hidden bug that if a user A is
mentioned in with @**name|id** then @**invalid|id**
again mentioned A because of the way we handled mentions
earlier. It is solved as a result of this refactor and
appropiate test has been added for this.

This has been tested manually as well as by adding new
test to address missing case.
2021-03-28 16:52:48 -07:00
..
data_import import/export: Fix deprecated authentication method for Slack. 2021-03-08 12:56:37 -08:00
lib markdown: Refactor backend logic for handling user mention. 2021-03-28 16:52:48 -07:00
management python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
migrations display_settings: Allow user to set default_view. 2021-03-11 18:09:08 -08:00
openapi requirements: Upgrade python-zulip-api from Git. 2021-03-26 16:31:03 -07:00
templatetags python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
tests markdown: Refactor backend logic for handling user mention. 2021-03-28 16:52:48 -07:00
tornado docs: Add a document explaining email/push notifications. 2021-03-05 15:24:25 -08:00
views dev_panel: Use correct content helper for portico pages. 2021-03-26 09:40:40 -07:00
webhooks integration: Update Zendesk Documentation. 2021-03-25 01:40:38 -07:00
worker requirements: Upgrade python-zulip-api from Git. 2021-03-26 16:31:03 -07:00
__init__.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
apps.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
context_processors.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
decorator.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
filters.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
forms.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
logging_handlers.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
middleware.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
models.py custom profile fields: Rename "CHOICE" to "SELECT" in frontend. 2021-03-26 11:49:11 -07:00
signals.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00