zulip/zerver/views
Mateusz Mandera f119c33789 delete_in_topic: Don't fetch .recipient for each message in a loop.
The grouping logic in `do_delete_messages` calls
`message.is_stream_message()` in a loop, which needs to access
message.recipient. This is obviously super inefficient if .recipient
hasn't been prefetched for the message objects.

`delete_in_topic` is the only function that calls `do_delete_messages`
with many messages, so this is the only spot we need to fix, to address
the immediate bug.
Of course a better improvement would be to fix `do_delete_messages` to
do something smarter than naively accessing message.recipient in a loop.
2025-08-11 10:08:40 -07:00
..
development confirmation: Rename REALM_CREATION to NEW_REALM_USER_REGISTRATION. 2025-08-04 18:41:00 -07:00
__init__.py
alert_words.py ruff: Fix UP035 Import from collections.abc, typing instead. 2024-07-13 22:28:22 -07:00
antispam.py altcha: More error-proofing around settings validation. 2025-07-25 22:29:51 -07:00
attachments.py attachments: Correct attachment_id type from string to integer. 2023-10-22 17:06:34 -07:00
auth.py auth: Pass None as default_subdomain to verify the host. 2025-07-28 10:59:38 -07:00
channel_folders.py channel-folders: Add PATCH method to reorder channel folders. 2025-08-06 16:34:40 -07:00
compatibility.py django: Use HttpRequest.headers. 2022-05-13 20:42:20 -07:00
custom_profile_fields.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
digest.py mypy: Fix most AnonymousUser type errors. 2021-07-24 14:55:46 -07:00
documentation.py test_docs: Remove help specific tests and port rest over to /api. 2025-08-08 11:59:29 -07:00
drafts.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
errors.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
events_register.py api: Add support for passing partial to include_subscribers parameter. 2025-08-04 18:43:14 -07:00
health.py health: Disable RabbitMQ check if not USING_RABBITMQ. 2024-10-13 11:42:49 -07:00
home.py home: Fix compose box not visible on focus in Firefox Android. 2025-03-19 21:54:14 -07:00
invite.py bots: Add a setting to customize the Welcome Bot message. 2025-08-08 18:59:37 -07:00
message_edit.py stream_settings: Add can_delete_own_message_group setting. 2025-07-17 15:44:52 -07:00
message_fetch.py narrow: Skip topic mutes for DM narrows. 2025-07-22 20:57:36 -07:00
message_flags.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
message_report.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
message_send.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
message_summary.py settings: Add setting to control permission for topic summarization. 2025-02-12 12:05:04 -08:00
muted_users.py bots: Fix muting of cross realm bots. 2023-11-27 16:16:23 -08:00
navigation_views.py navigation_view: Add "scheduled" to built-in view fragments. 2025-07-11 15:48:20 -07:00
onboarding_steps.py onboarding_steps: Add 'navigation_tour_video' for new users. 2025-03-13 14:38:16 -07:00
presence.py api: Add administrator endpoint for updating user status. 2025-07-18 17:37:26 -07:00
push_notifications.py register_push_device: Add an error code to push-not-configured error. 2025-07-23 11:11:46 -07:00
reactions.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
read_receipts.py message: Make is_modifying_message a mandatory kwarg. 2025-02-28 10:10:33 -08:00
realm_domains.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
realm_emoji.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_export.py export: Also add guardrail to the management command. 2025-03-28 17:44:58 -07:00
realm_icon.py upload: Pass down content-type of realm icon/logo to backend. 2024-07-11 07:31:39 -07:00
realm_linkifiers.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_logo.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_playgrounds.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
realm.py bots: Add a setting to customize the Welcome Bot message. 2025-08-08 18:59:37 -07:00
registration.py bots: Add a setting to customize the Welcome Bot message. 2025-08-08 18:59:37 -07:00
reminders.py message_reminders: Add support for notes. 2025-08-07 17:13:12 -07:00
report.py csp_violations: Migrate has_request_variables to typed_endpoint. 2024-03-08 11:26:00 -08:00
saved_snippets.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
scheduled_messages.py zerver: Add endpoints and events for reminders. 2025-07-02 12:47:00 -07:00
sentry.py ruff: Fix UP038 Use X | Y in isinstance call instead of (X, Y). 2024-07-13 22:28:22 -07:00
storage.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
streams.py delete_in_topic: Don't fetch .recipient for each message in a loop. 2025-08-11 10:08:40 -07:00
submessage.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
thumbnail.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
tusd.py confirmation: Rename REALM_CREATION to NEW_REALM_USER_REGISTRATION. 2025-08-04 18:41:00 -07:00
typing.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
unsubscribe.py email: Bulk clearing of scheduled emails for multiple users. 2025-07-11 14:15:49 -07:00
upload.py upload: Rename attachment_vips_source, as it's not just for vips_source. 2025-07-29 10:01:40 -07:00
user_groups.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
user_settings.py settings: Add user setting to ignore channel folders in left sidebar. 2025-08-01 09:18:19 -07:00
user_topics.py views: Sort parameters alphabetically. 2025-06-30 09:13:25 -07:00
users.py validate_email_not_already_in_realm: Add kwarg for mirror dummies. 2025-07-07 17:15:08 -07:00
video_calls.py video-calls: Add Zoom Serverto Server OAuth integration. 2025-02-13 16:35:43 -08:00
welcome_bot_custom_message.py bots: Add a setting to customize the Welcome Bot message. 2025-08-08 18:59:37 -07:00
zephyr.py users: Remove unnecessary get_api_key helper. 2025-02-13 12:40:53 -08:00