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.
Earlier, the `is_topic_name_considered_empty` function
used to return true only if the topic_name is either:
* ""
* "(no topic)"
* `realm_empty_topic_display_name` value
The third condition is not precisely correct. This commit
replaces it with the displayed topic name for `""` topic.
The displayed topic name is not always the same as
`realm_empty_topic_display_name` value.
This is a pre-commit to add the function
"format_array_output_based_on_and_preference()" which will take
two parameters- string array and a boolean whether we want and
based output or not. This function return a string formatted
using Intl.ListFormat.
This commit adds the `invalid-input` class to the inline topic edit
input element when the new topic name is considered empty as a result
of realm_mandatory_topics property being set to True. This adds the
red glow borders to the invalid input field, which visually
communicates that some thing is wrong with the new topic name.
Extracts message_fetch and get_events algorithms for calculating the
exponential backoff into a shared helper function.
These match the algorithm that were designed for the Python API, except
that we use a ratio of 2 rather than sqrt(2) in the message_fetch code
path.
These never happen in practice since util is near the
end of the alphabet, but if you had run the tests in
reverse order, you would have seen this leak.
This leak was introduced in the efb2a5a38d commit.
Updates the invite modal so that if the custom input is 0, the
submit button is deactivated, since an email invitation or invite
link that immediately expired would be unusable.
Also, updates the custom input to show 0 if a user navigates away
from and back to the custom input option afer putting in an invalid
value, e.g. "abc" or "-20". Previously, the custom input showed
"NaN" in that case.
We now mention if user is member of the group in the "Members"
tab, also including the details about whether the user is direct
member or is member by being direct member of one of the subgroups.