zulip/zerver
Mateusz Mandera 90636d5e81 events: Fix bug in get_recent_conversations_recipient_id.
user_profile.id was confused for user_profile.recipient_id. These bugs
are particularly sneaky as they can go undetected by tests due to ids of
objects accidentally coinciding. We add a mitigation for this class of
mistakes by shifting the Recipient.id sequence in test db.

This was introduced in dda3ff41e1.
On the rare occasion where user_profile.id would coincide with
recipient_id passed to the function, we would return the wrong value.
That is, instead of correctly returning recipient_id, we would return
sender.recipient_id - recipient id of the sender of the message, thus
possibly returning user_profile.recipient_id (if user_profile is the
sender) - exactly the situation the function wanted to avoid
with the `if recipient_id == my_recipient_id:` if. Ultimately resulting
in incorrect/malformed data in
state['raw_recent_private_conversations'].
2021-02-09 17:45:34 -08:00
..
data_import hipchat_import: Remove tool from codebase. 2020-12-23 08:28:49 -08:00
lib events: Fix bug in get_recent_conversations_recipient_id. 2021-02-09 17:45:34 -08:00
management list_realms: Convert percent formatting to "".format. 2021-01-26 13:27:22 -08:00
migrations migrations: Enforce evaluation order in 0306 WHERE clause. 2021-01-29 09:35:52 -08:00
openapi api docs: Minor fixes in documentation. 2021-02-05 10:41:42 -08:00
templatetags python: Replace list literal concatenation with * unpacking. 2020-09-02 11:15:41 -07:00
tests tests: Fix bugs confusing recipient.type_id for other ids. 2021-02-09 17:45:34 -08:00
tornado tornado: Reduce logging of event queue load/dump. 2020-12-20 12:14:39 -08:00
views users: Clarify readability issues related to access_user_by_id. 2021-02-05 17:31:45 -08:00
webhooks bitbucket webhook: Fully deprecate username field. 2021-02-05 09:46:27 -05:00
worker digest: Fix the structure that we enqueue across when digesting. 2021-02-08 17:28:59 -08:00
__init__.py
apps.py
context_processors.py i18n: Don't include email tags in translation strings. 2020-09-25 15:53:26 -07:00
decorator.py home: Allow logged out user through home. 2020-11-02 17:07:12 -08:00
filters.py
forms.py registration: Move "already in realm" check outside of validation. 2021-01-13 11:28:32 -08:00
logging_handlers.py python: Use universal_newlines to get str from subprocess. 2020-10-30 11:36:38 -07:00
middleware.py django3: Save language preference in a cookie rather than the session. 2021-01-17 10:38:58 -08:00
models.py dependencies: Upgrade to Django 3.1. 2021-01-26 10:20:00 -08:00
signals.py timezone: Remove get_timezone wrapper. 2020-10-27 13:42:54 -07:00