We now use `data-user-group-id` to check if a banner for the same
group already exists, preventing duplicate warnings when the same
group is mentioned multiple times.
(cherry picked from commit 35289dfe51)
In dark theme, when clicking the "Add task" button of
todo and "Add option" button of poll, the background
color incorrectly turns white.
This commit removes the white background color of the
buttons and makes it consistent woth the other green
buttons.
(cherry picked from commit eef44429e2)
When a message is moved using the "Move only this message" option
a confirmation toast is shown. This commit adds support to show
"general chat" in link of the toast when a message is moved to it.
(cherry picked from commit 939691dfed)
Searching for a word that appears in a message in a empty string
topic via the search box resulted in a message view where the
topic names in the recipient_row were empty string instead of
`realm_empty_topic_display_name`.
This commit fixes that bug.
(cherry picked from commit 8383b11526)
This was likely a longstanding issue that wasn't
caught because we required topics on CZO. The new
logic ensures topic match even for empty string
(general chat) topics.
(cherry picked from commit 8a51fa4b83)
Earlier, for topic="" and mandatory_topics=False, the inline topic
edit input field width was not set correctly when the inline topic
edit was started for the first time.
This resulted in overflowing placeholder.
This commit fixes that bug.
(cherry picked from commit b53327dabe)
Showing this banner in every view can be annoying. As a first step,
we only show it in conversation view to reduce the banner spam.
(cherry picked from commit 6c81ff61ee)
Apparently, while we set our own maximum password length of 100
characters, zxcvbn had a hardcoded maximum length of 72 characters,
and threw an exception if that was exceeded.
The fact that we're discovering this now would suggest that nobody has
previously attempted a password between 72 and 100 characters in
length.
(cherry picked from commit 37b7a32eb4)
Refactors get_recipient_label so that it's a bit clearer what the
recipient_information parameter is for and what we do when that
parameter is undefined.
In doing so, we no longer treat the constructed objects, that are
passed as the recipient_information parameter, and actual Message
objects, that we get from the current message list view, as the
same thing.
(cherry picked from commit 7d3b77e490)
Both the inbox and recent conversation views pass information about
the reply recipient to this function's caller so that the button
text can be updated for the focused row.
Therefore, the check for an undefined current message list should
be inside the case where the recipient information parameter is
undefined.
This was changed in f630272b4c when non-message list views set
undefined for the current message list.
(cherry picked from commit 4f163e5ad2)
Renames ComposeClosedMessage to ReplyRecipientInformation, and
exports the type from compose_closed_ui.ts so that the functions
that construct these objects from the recent conversations and
inbox views have the type available.
Also, renames the variables for these objects to not be "message",
so that it's clear that these are not Message objects.
(cherry picked from commit b48134a03e)
Renames update_reply_recipient_label to
update_recipient_text_for_reply_button.
This better matches the function that sets the default text for
the closed compose box button: set_standard_text_for_reply_button.
(cherry picked from commit 94fe5fc173)
Instead of relying on different functions to get error messages,
we use `validate` to get the error message for the current compose
state.
This fixes a bug where compose tooltip was not defined when
compose state was not valid.
(cherry picked from commit 01c5197dd9)
We now use `disabled-message-send-controls` class to control
the disabled status of send button. So, this is not required.
(cherry picked from commit ad0b616bbd)
This is follow-up commit for d00b4cb0bd,
which updates the padding of the banner label and banner close button
to accommodate the previous font size change.
(cherry picked from commit 836e04fac8)
This commit converts the pixel values to em instead to make the banner
scale better with the different font sizes.
(cherry picked from commit bf88426cd1)
If there were no users found for `find_team`, we need to provide
a default langauge for the email as one cannot be extracted from
`UserProfile` in this case.
(cherry picked from commit e6dd79f241)
Performance remains the same whether we're using the bulk function
underneath the function in question or not, this helps us avoid
duplication.
(cherry picked from commit 2e48293e4b)
We want this function to just use the bulk function instead underneath,
we add a query count check here so that when we do that replace in the
next commit, we can make sure that the query count has not increased.
(cherry picked from commit 0570bfa90c)
This function will be useful in finding out affected groups when
sending events for users gaining or losing metadata access when the
members of a user group change in any way.
(cherry picked from commit 139679cdb1)
This function will be useful in sending events for users gaining or
losing metadata access when the members of a user group change in any
way.
(cherry picked from commit 208ee1b8d9)
Since the strings like "Subscribed" will be translated to other
languages, they will not work correctly when compared with
these values in other languages.
Fixed by using data values that are not translated.
(cherry picked from commit 3429898dbf)
We were not using `filter_out_inactives` and `pin_to_top` when
sorting stream in the left sidebar.
These were incorrectly removed in
1aee0ef98b.
Restored the original function and the places where it was used
to bring back original functionality.
(cherry picked from commit 67ff430e45)
When initializing the app or re-rendering left sidebar to update
the `demote_inactive_streams` property, we need to update
`filter_out_inactives` property first.
(cherry picked from commit 737acb1cb1)
The Django ORM query would not work correctly for pathological
DirectMessageGroups with no Subscription rows. When the Subquery gave
empty results, the UPDATE would set group_size to null - when the point
of the migration was exactly to make sure this column is always set and
allow making the column non-nullable in 0575.
Such DirectMessageGroups can occur as a result doing .delete() on all
UserProfiles that were in the group - or by doing realm deletion via
either .delete() or `manage.py delete_realm`.
The natural choice for group_size of these objects is 0. The simple SQL
query naturally achieves this result, without needing any special
handling for this case.
(cherry picked from commit 60e166bcd0)
This prevents the venv from ending up with references to /root.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit c517e95e6b)