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.