zulip/zilencer/management/commands
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
..
__init__.py
add_mock_conversation.py python: Close opened files. 2020-10-26 12:31:30 -07:00
add_new_realm.py refactor: Pass realm to bulk_add_subscriptions. 2020-10-13 11:28:17 -07:00
add_new_user.py database: Remove short_name from UserProfile. 2020-07-17 11:15:15 -07:00
add_remote_server.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
calculate_first_visible_message_id.py python: Remove redundant dest for argparse arguments. 2020-09-02 11:04:10 -07:00
compare_messages.py python: Convert "".format to Python 3.6 f-strings. 2020-06-08 15:31:20 -07:00
invoice_plans.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
mark_all_messages_unread.py mark_all_messages_unread: Remove reset of depricated pointer. 2020-07-06 15:47:27 -07:00
migrate_stream_notifications.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
populate_db.py events: Fix bug in get_recent_conversations_recipient_id. 2021-02-09 17:45:34 -08:00
print_initial_password.py python: Elide type=str from argparse arguments. 2020-09-03 16:17:14 -07:00
profile_request.py python: Elide type=str from argparse arguments. 2020-09-03 16:17:14 -07:00
queue_rate.py docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
render_messages.py python: Replace ujson with orjson. 2020-08-11 10:55:12 -07:00
rundjangoserver.py django: Add custom runserver wrapper to limit startup logging. 2020-12-20 12:11:16 -08:00
sync_api_key.py python: Convert percent formatting to Python 3.6 f-strings. 2020-06-10 15:02:09 -07:00