We make the following changes:
- Remove the dm partnership check before calling the comparator passed
by the caller, and instead have the more thorough `compare_by_pms` be
the final tie breaker. This deprioritization of dms fixes the bug where
dm partners would be prioritized even if they had not participated in
a stream conversation over recent senders who are not dm partners.
- Make the passed comparator optional, since the tie breaker is same as
the comparator that was passed so far for dms, and only pass it in case
of a stream conversation.
For the rare case where there is no recent recipient count for a pair of
users when sorting, we now check if either has been a dm conversation
partner ever before.
When user is trying to open a modal after clicking on a button
in a popover, we call popovers.hide_all() before opening the modal
which hides the popover but since the event handler call isn't
finished running yet, we call instance.hide() again resulting in
tippy throwing errors that this could be a memory leak.
We introduce a wrapper function for `instance.hide` which if
the popover/tooltip is visible before hiding it to fix it.
SHA1PasswordHasher will be removed in Django 5.1. MD5PasswordHasher
will remain for exactly this purpose of speeding up tests.
Use MD5PasswordHasher by default, but leave SHA1PasswordHasher in the
list for compatibility with test databases that have already been
generated. Once some other change forces test databases to be
rebuilt, we can remove SHA1PasswordHasher.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Until "stream" is renamed to "channel" in user facing strings,
when "channel" is selected from the composebox typeahead options,
the "stream" wildcard syntax will be inserted in the message
content instead.
Adds some helper functions to util.ts to initially be used to
check/convert "channel" to "stream" during the rename process,
with the intention of then converting those helpers for the
reverse (check/convert "stream" to "channel") in the final part
of the rename process.
Part of project to rename "stream" to "channel".
Adds "channel" to the `stream_wildcards` frozenset for stream
wildcard notifications on the backend/server.
Updates frontend/web-app to handle "channel" as the other stream
wildcards are handled in the typeahead and composebox modules.
Updates the API version and documentation for the addition of
"channel" as a wildcard mention. But does not change any of the
functionailty of (or deprecate) the "stream" wildcard at this
point.
Part of project to rename "stream" to "channel".
Adds a "Message formatting" article to the API documentation. To
start, the article is a changelog of updates to markup features for
messages, with the idea being that it can be expanded to further
describe and document Zulip's markup features in future iterations.
92fa9ee78c switched this regex to match the server-side regex, but
Safari < 16.4 does not support look-behind in regexes.
Switch to matching on start-of-string or a positive character class.
The process of running Django's built-in database and config checks
can be very heavy-weight, potentially taking multiple seconds:
```
$ hyperfine './manage.py print_initial_password iago@zulip.com' './manage.py print_initial_password iago@zulip.com --skip-checks'
Benchmark 1: ./manage.py print_initial_password iago@zulip.com
Time (mean ± σ): 4.943 s ± 0.722 s [User: 4.434 s, System: 0.311 s]
Range (min … max): 4.415 s … 6.835 s 10 runs
Benchmark 2: ./manage.py print_initial_password iago@zulip.com --skip-checks
Time (mean ± σ): 1.786 s ± 0.113 s [User: 1.598 s, System: 0.162 s]
Range (min … max): 1.576 s … 1.999 s 10 runs
Summary
'./manage.py print_initial_password iago@zulip.com --skip-checks' ran
2.77 ± 0.44 times faster than './manage.py print_initial_password iago@zulip.com'
```
This extends the window during which nginx is forced to serve 502's to
clients. f5f6a3789b added an explicit `manage.py check` during
server restarts, and fa77be6e6c added one during upgrades; as such,
we expect that any check failures will already have been caught when
performing a restart or upgrade, and there is no point in running them
on process startup.
At least one of the callers already passes the field in the opts
parameter, and the other can easily include it in the object.
(It might have it already, but that'll be easily checked while
converting compose_actions).
Earlier, when adding a new user failed due to no spare licenses
available, a message was sent to the "New user announcements"
stream.
We plan to disable the stream by default as a part of improving
onboarding experience.
Now, we send a group DM to admins when adding a new user fails
due to no spare licenses available. It makes it independent of
the "New user announcements" setting. These warning messages
are important and shouldn't be missed.
Earlier, low licenses warning message was sent to the
"New user announcements" stream.
We plan to disable the stream by default as a part of improving
onboarding experience.
Now, we send a group DM to admins for low licenses warning
to make it independent of the setting. These warning messages
are important and shouldn't be missed.
This is a prep commit to add a 'recipient_users' parameter to
the 'internal_send_huddle_message' function.
'emails' is no longer a required parameter. We can use either
of the 'emails' or 'recipient_users' parameter. 'emails' is
eventually used to fetch 'recipient_users', so if the
'recipient_users' is already available we should use that to
skip database query.
In `composebox_typeahead`, it is completely possible to call
`people.get_mention_syntax` for a wildcard mention, which will not
have a `user_id`.
Updates `get_mention_syntax` to not raise a blueslip error if the
mention syntax is for a wildcard mention.
Adds "topic" to the array of possible wildcard mention strings.
Tightens the types for the parameters for `get_mention_syntax`, by
setting `user_id` to be number or undefined, and by setting `silent`
to default to false (which is expected in a number of modules where
this function is called).
This commit updates the user invitation terminology in the right
sidebar, user invitation modal, and settings, to clarify exactly what
sort of invitation this is.
Fixes#29582.
This commit adds the /help link to the User Identity section heading
of the Organization Permissions, linking to /help/restrict-name-and-
email-changes.