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.
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.
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.
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".
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
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.
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.
`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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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>
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>
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>
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.
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.
This commit removes a trailing space in the viewport meta tag, which was
causing a browser warning:
“Viewport argument key "" not recognized and ignored.”