mirror of https://github.com/zulip/zulip.git
1b8a5a3344
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. |
||
---|---|---|
.. | ||
__init__.py | ||
api_arguments_table_generator.py | ||
api_return_values_table_generator.py | ||
fenced_code.py | ||
help_emoticon_translations_table.py | ||
help_relative_links.py | ||
help_settings_links.py | ||
include.py | ||
nested_code_blocks.py | ||
tabbed_sections.py | ||
testing_mocks.py |