Commit Graph

64398 Commits

Author SHA1 Message Date
Karl Stolley
d5822a04be decorated_channels: Present names in DOM nodes. 2025-04-22 11:26:12 -07:00
Karl Stolley
3671a6a39c decorated_channels: Rename privacy-icon class. 2025-04-22 11:26:12 -07:00
Karl Stolley
1c55004cda decorated_channels: Rename partial as 'decorated_channel'. 2025-04-22 11:26:12 -07:00
Shubham Padia
b8ba174455 users: Return true for admins for is_moderator.
This change is for consistency with how is_admin works.

API design discussion at https://chat.zulip.org/#narrow/channel/378-api-design/topic/Should.20is_moderator.20have.20admins
2025-04-22 11:24:49 -07:00
Shubham Padia
50fbaa4da6 popover_menus_data: Remove unused is_moderator from topic context. 2025-04-22 11:24:49 -07:00
Prakhar Pratyush
ccc82976dc unread_data: Ensure deterministic ordering of unread message rows.
Earlier, in `get_raw_unread_data` the ordering was applied inside
the CTE.

Once we leave the CTE scope and do a join, SQL makes no promise
about preserving the row order unless we re-specify ORDER BY in
the outer query.

Since, there was no ORDER BY clause in the outer query it was
resulting in a random ordering of the entries. This bug was caught
by `test_unreads_case_insensitive_topics` failing in a flaky way.

This commit fixes the bug.
2025-04-22 10:36:59 -07:00
Alex Vandiver
6b3143d7fc send_email: Add a flag to force all emails through the queue.
Sending emails synchronously is useful because it reports
configuration errors -- but it also means that occasional failures can
result in ugly 500's, since those don't retry.

Add a setting which forces all email to go through the `emil_senders`
queue, so it can be retried as needed.
2025-04-22 10:26:25 -07:00
Saubhagya Patel
9f1744511b css: Remove .thinner class from Settings.
This commit removes the `.thinner` class from the
"Play animated images" setting in Preferences > Information,
and from the "Home view" setting in Preferences > Navigation.
The `.setting-next-is-related` class, used in combination with
the `.thinner` class, is also removed as it is not needed.
We no longer use the `.thinner` class.
2025-04-22 09:33:59 -07:00
Lauryn Menard
19f60b203d api-docs: Add note about realm being present in fetch_event_types.
Adds "Present if realm is present in fetch_event_types" to the
fields in the POST /register response that are added to the state
data via fetch_initial_state_data in the if block for "realm".
2025-04-21 14:58:26 -07:00
Ines Falcato
8d96b7879f keyboard_UI: Allow use of e hotkey for spectators.
Previously, when in anonymous login, pressing the "view original
message" button showed the original message and allowed copying it.
However, the corresponding keyboard shortcut ('e') did not work as
expected and a login pop-up appeared instead.

Now, by fixing the UI features' permissions for anonymous users, by
adding "edit_message" as a feature they can perform, they are allowed
to use the 'e' keyboard shortcut as intended.

Fixes #33838
2025-04-21 14:36:10 -07:00
apoorvapendse
18fdbc1519 message_header: Use topic permalink.
Fixes:
https://chat.zulip.org/#narrow/channel/137-feedback/topic/star.20topics/near/2154280.
2025-04-21 12:08:37 -07:00
apoorvapendse
1285151be8 compose_validate: Show disabled save tooltip when message is long.
Fixes:
https://chat.zulip.org/#narrow/channel/101-design/topic/validation.20tooltip.20in.20message.20edit.20same.20as.20compose.3F/near/2149696.
2025-04-21 12:07:45 -07:00
Lauryn Menard
cb3dc88dcf corporate: Show "Fixed" as rate for fixed-rate plans in activity charts. 2025-04-21 11:18:40 -07:00
Karl Stolley
3767c2d98e corporate: Update GetApp, Capterra badges. 2025-04-20 07:43:27 -07:00
Prakhar Pratyush
bf95e9bcae test_push_notifications: Split HandlePushNotificationTest to a new file.
This commit moves `HandlePushNotificationTest` to a new
`test_handle_push_notification.py` file.

It helps in making it easier to work with `test_push_notifications.py`
which was 4000+ lines of code.
2025-04-17 10:55:05 -07:00
Prakhar Pratyush
f98c36210a test_push_notifications: Move PushNotificationTest to test_classes.py.
This is a prep commit which moves the `PushNotificationTest` class
from `test_push_notifications.py` to `test_classes.py` as we plan to
import it and reuse it in other files.

This commit also renames `PushNotificationTest` to
`PushNotificationTestCase` to align with our naming convention
in `test_classes.py` to name classes, which act as a parent class
with helper methods and no actual test within itself, with a
"TestCase" suffix.
2025-04-17 10:55:05 -07:00
Prakhar Pratyush
644efeaa14 test_push_notifications: Rename TestPushApi and it's test methods.
`TestPushApi` was not a great name to reflect what it specifically
tests.

Renamed it to `TestAddRemoveDeviceTokenAPI`. It's test methods
are also renamed for clarity.
2025-04-17 10:55:05 -07:00
Prakhar Pratyush
393423c3a0 test_push_notifications: Split AnalyticsBouncerTest to a separate file.
This commit moves `AnalyticsBouncerTest` to a new
`test_zilencer_analytics.py` file.

It helps in making it easier to work with `test_push_notifications.py`
which was 5000+ lines of code.
2025-04-17 10:55:05 -07:00
Lauryn Menard
b074288bac upgrade: Remove demo_organization_scheduled_deletion_date page param.
The demo_organization_scheduled_deletion_date has never been used
on the upgrade page, and currently raises a Zod error as what is
being sent for the value of that page param is a datetime object,
and not the datetime object converted to an integer.

We really only need the boolean value that checks if the demo
organization scheduled deletion date is not None for the upgrade
page logic, which is set in the context dict for that page, but
not in the page params.
2025-04-17 10:49:02 -07:00
Lauryn Menard
f511383c3d banner-links: Remove underline from links in navbar banners.
Updates the "banner-link" class, which is currently only used
in the demo organization deletion info banner so that the link
text is not underlined when the user is not hovering over the
link text.
2025-04-17 10:48:33 -07:00
Lauryn Menard
7e1625d58b showroom-banners: Update desktop notifications banner text.
Updates the desktop notificaiton banner example in the devtools
showroom for the banner redesign to have the current banner text
that's used in navbar alert.
2025-04-17 10:48:33 -07:00
Lauryn Menard
48c9a86962 api-version: Bump API version for prev_content_sha256 parameter.
This parameter was added to the PATCH /messages/message_id endpoint
in commit e2e0603689.
2025-04-17 10:47:37 -07:00
Niloth P
22c80117f5 integrations: Add OpenSearch incoming webhook integration.
Co-authored-by: merlinz01 <158784988+merlinz01@users.noreply.github.com>
2025-04-16 14:05:29 -07:00
Niloth P
7e3218ee45 generate-integration-docs-screenshot: Support plain/text payloads.
All *.txt fixtures were assumed to only contain URL parameters,
now fixtures with plain/text payloads are also supported.
2025-04-16 14:05:29 -07:00
Tim Abbott
b76cf0c388 message_edit: Remove useless message_id XHR parameters.
The message ID is passed in the URL.

Caught by reviewing ignored_parameters_unsupported.
2025-04-16 14:05:12 -07:00
Kislay Verma
e2e0603689 message_edit: Check previous message content to prevent races.
Similar to group based setting values, we expect
the client to send the previous content alongwith
the edited content to the edit message endpoint.
We reject the request incase the previous content
doesn't match the current message content, which
could happen in case two users simultaneously edit
a message - which will be implemented in #33051.
2025-04-16 14:05:12 -07:00
Kislay Verma
5b5be39b19 exceptions: Create base class ExpectationMismatchError.
This class will be inherited by all errors related to
some sort of mismatch from the expected value.

This is a prep commit for #33051, as a part of which we
add a new exception class for message content mismatch.
2025-04-16 14:05:12 -07:00
Karl Stolley
1f19ea6454 message_feed: Remove unnecessary opacity value. 2025-04-16 13:17:19 -07:00
Karl Stolley
3278fc36ca variables: Correct instances of misspelled 'message'. 2025-04-16 13:17:19 -07:00
Sayam Samal
b5e41e1ca0 css: Use CSS variable for bookend and date row spacer lines. 2025-04-16 10:44:51 -07:00
Sayam Samal
71609a3032 message_row: Consolidate date row and bookend styles to message_row.css. 2025-04-16 10:44:51 -07:00
Sayam Samal
1042c7f891 message_row: Combine date row related CSS in zulip.css. 2025-04-16 10:44:51 -07:00
Sayam Samal
377cc2a9d9 message_row: Combine bookend related CSS in zulip.css. 2025-04-16 10:44:51 -07:00
Sayam Samal
f1b3867c6a message_row: Remove tag-level filtering in the date row timerender CSS.
This commit improves the CSS matching performance by avoiding tag-level
filtering in the date row CSS. Instead of using the `span` tag we use
the ".timerender-content" class to filter the same time/date elements.

Since this class is added by `timerender.render_date()` to the span
element inside date_row on every instance, we can use it with assurance.
2025-04-16 10:44:51 -07:00
Sayam Samal
93fb84bc98 message_row: Remove tag-level filtering in the bookends CSS.
This commit reduces the selector scope and improves the CSS matching
performance by avoiding tag-level filtering in the bookends CSS.

This also removes the `.sub-unsub-message` class from the bookend as it
served no additional support and the `.bookend`` class can be used
directly instead to maintain the styling of this element.
2025-04-16 10:44:51 -07:00
Maneesh Shukla
94bbfaebe4 settings: Make stream and group settings thead sticky.
Co-authored-by: Karl Stolley <karl@zulip.com>
2025-04-16 09:24:37 -07:00
Sahil Batra
d34bdf8af5 users: Fix comment for base_bulk_get_user_queryset.
We no longer fetch can_access_all_users_group using
select_related after #34356.
2025-04-16 09:02:45 -07:00
Tim Abbott
c39c984993 Release Zulip Server 10.2. 2025-04-15 18:28:16 -07:00
Mateusz Mandera
57d77e0a55 realm_creation: Disable open realm creation if no password backend. 2025-04-15 18:28:16 -07:00
Mateusz Mandera
de37ab28a8 signup: Don't run password_strength form validator in ldap signup mode.
When an ldap user is signing up via the registration form, they are
required to enter their ldap password. This is in contract to "regular"
password signup, where the user sets the password for their new account.

Checking password strength makes sense in the latter case, but not in the
ldap case - the password is already set at the ldap level after all.

In any case, the password_strength validator is not even added to the
form field with `id="ldap-password"`, so this was bugged throwing errors
such as

```
TypeError: $.validator.methods[method] is undefined. Exception occurred when checking element ldap-password, check the 'password_strength' method. at http://localhost:9991/webpack/vendors-node_modules_pnpm_jquery-validation_1_21_0_jquery_3_7_1_node_modules_jquery-validatio-b912f7.js:810
at check .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:803
at element .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:510
at onfocusout .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:310
at delegate .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:441
at dispatch .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:5145
at ../node_modules/.pnpm/jquery jquery/dist/jquery.js?1d73/</add/elemData.handle@http://localhost:9991/webpack/vendors-node_modules_pnpm_error-stack-parser_2_1_4_node_modules_error-stack-parser_error-stac-967546.js:16502
at trigger .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:8629
at simulate .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:8698
at focusMappedHandler .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:5574
```

when interacting with the form.
2025-04-15 18:28:16 -07:00
Mateusz Mandera
c4bb6509dd signup: Prevent unauthorized signup for realms without EmailAuthBackend.
Zulip supports a configuration where account creation is limited solely
by being able to authenticate with a single-sign on authentication
backend, such as Google Authentication, SAML, or LDAP (i.e., the
organization places no restrictions on email address domains or
invitations being required to join, but has disabled the
EmailAuthBackend that is used for email/password authentication).

A bug in the Zulip server meant that Zulip allowed users to create an
account in such organizations by confirming their email address, without
having an account with the SSO authentication backend.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-04-15 18:28:16 -07:00
Ritwik
2429157498 streams: Don't glue translated strings in new channel notification.
We now translate the whole notification message instead of substituting
an already translated policy_name. This avoids scenarios where only part
of the notification message is translated.

Fixes #30212.

Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
2025-04-15 16:28:38 -07:00
Ritwik
187a008f13 streams: Modify get_stream_permission_policy_name to return dict key.
This is a prep commit for #30212. It will allow us to compare the key
and not translated policy name.

Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
2025-04-15 16:28:38 -07:00
opmkumar
8482a9480b email: Apply message content visibility settings to digest too.
Fixes #33190.
2025-04-15 16:24:59 -07:00
opmkumar
8c556cafbb email: Update "Log in" string in digest emails. 2025-04-15 16:24:59 -07:00
opmkumar
5530981db9 email: Update message content disabled wording for missed messages.
This commit updates the wording used in missed messages emails
when message content is disabled.
The corresonding help URL included in the email has also
been updated.
2025-04-15 16:24:59 -07:00
opmkumar
ec81c027fc digest: Pass length of hot_conversations to enough_traffic function.
Previously, `hot_conversations` was incorrectly passed as a string to the
`enough_traffic` function. This commit fixes the issue by passing the length
of `hot_conversations` as a parameter instead.
2025-04-15 16:24:59 -07:00
Anders Kaseorg
c40bd39a01 webpack: Disable cross-origin-header-check middleware.
This middleware in webpack-dev-server 5.2.1 appears to be intended to
plug some undisclosed browser-specific vulnerability that allows
stealing code from closed-source projects.

https://github.com/webpack/webpack-dev-server/issues/5446#issuecomment-2768816082
https://github.com/webpack/webpack-dev-server/issues/5446#issuecomment-2772150109

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-15 16:18:06 -07:00
Anders Kaseorg
0f2f795fe0 Revert "webpack: Use CORS requests for stylesheets."
This reverts commit bdd11577bf (#34359).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-15 16:18:06 -07:00
Maneesh Shukla
7ff6460d4b meta-tag: Remove invalid space in viewport meta tag.
This commit removes a trailing space in the viewport meta tag, which was
causing a browser warning:
“Viewport argument key "" not recognized and ignored.”
2025-04-15 16:09:55 -07:00