The administrator fills out the API token field as e.g.
Bearer secret123
So let's write that as Bearer <token> to make it clear which part of
that expression is to be replaced.
These models should be one-to-one. Various bugs in the past have
leaked violations in both directions; we clean them up such that every
PreregistrationUser which is not a multi-use invite has exactly one
Confirmation object associated with it.
Fixes: #22025
The "invites" worker exists to do two things -- make a Confirmation
object, and send the outgoing email. Making the Confirmation object
in a background process from where the PreregistrationUser is created
temporarily leaves the PreregistrationUser in invalid state, and
results in 500's, and the user not immediately seeing the sent
invitation. That the "invites" worker also wants to create the
Confirmation object means that "resending" an invite invalidates the
URL in the previous email, which can be confusing to the user.
Moving the Confirmation creation to the same transaction solves both
of these issues, and leaves the "invites" worker with nothing to do
but send the email; as such, we remove it entirely, and use the
existing "email_senders" worker to send the invites. The volume of
invites is small enough that this will not affect other uses of that
worker.
Fixes: #21306Fixes: #24275
This prevents users from hammering the invitation endpoint, causing
races, and inviting more users than they should otherwise be allowed
to.
Doing this requires that we not raise InvitationError when we have
partially succeeded; that behaviour is left to the one callsite of
do_invite_users.
Reported by Lakshit Agarwal (@chiekosec).
This only every did a single extra fetch, and now that this fetch is
in the same direction as our main fetching sequence, no longer is
meaningfully different from just specifying a different value of
consts.maximum_initial_backfill_size.
Previously, when a message is edited, it is locally echoed with its
pre-edit content.
This is because previously, when we tried to render the edited
message of the edit box during local echo, in order to update
the content, flags, and is_me_message properties of the message
object with that of those returned is markdown.render(), we used
the spread operator and created a new message object, and updated
the existing message object with this new one.
This was misconverted, since edit_locally() method already has a
fully-rendered message object to start with, and is just doing a
rerendering, it should be mutating what message it received, rather
than constructing a new local variable.
As a follow up to commit ad013a9, this updates the /help/dark-theme
docs to describe the newer way to switch themes via the theme switcher,
located in the Personal Menu.
This replaces the documentation on switching themes via
"Personal Settings".
Fixes#29550.
This removes the common min-width being used across all popovers and
instead sets the min-width according to a popover's requirements.
This allows for greater control over the popovers since we have a
variety of use cases for them — which a single common min-width cannot
accommodate.