There was a comment mentioning get_all_realm_user_groups
was only used in tests, but we now use it to get potential
subgroups of a group, so that comment is removed.
Introduce a feature to schedule realm data deletion time during realm
deactivation. This includes a server-level setting to configure the
minimum and maximum allowed deletion days.
Co-authored-by: Ujjawal Modi <umodi2003@gmail.com>
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
Fixes#24677.
Previously, when the group description was empty, the group description
element still existed as an empty element which resulted in an extra
gap between the group name and the members count.
This commit fixes this by conditionally rendering the group description
element in the handlebar template.
Previously, due the uneven width between the icons and the user
presence indicator, the icons and presence indicator were misaligned
with each other.
This commit uses the grid and subgrid layout systems to fix this
misalignment issue.
This commit adds the icon-only button styles to the codebase along with
appending this new button style to the storybook-style page in
`/devtools/buttons` to view and test the icon-only button component.
The redesigned icon button component, uses the `icon-button` class to
follow Zulip's no-abbreviation policy, and to avoid conflicts with the
pre-existing `button` and bootstrap `btn` classes.
A button using this new style, should use the following classes,
- First, the base `icon-button` class which defines the structure
and behavior of the button. (Required)
- Second, a `icon-button-square` class, to be used in conjecture
with the `icon-button` class which provides the style for the squared
button style of icon button. (Optional)
- Third, a modifier class like `icon-button-neutral` which
defines the colors for the particular icon button type. (Required)
This commit makes the Slack incoming webhook use the original
`convert_slack_formatting` and `convert_slack_workspace_mentions` from
`slack_message_conversion.py`. Previously those were not refactored out
into two smaller functions yet.
Fixes part of #30827.
Previously the `check_token_access` is called for every request we get
from Slack webhook, this may introduce significant latency.
This commit moves `check_token_access` to the same condition for when we
need to handle Slack challenge handshake so that we only do API token
check once per URL registered.
Additionally, we now check for the specific scopes that we need to run
the Slack webhook integration (SLACK_INTEGRATION_TOKEN_SCOPES).
Fixes part of #30827.
Previously, the `check_token_access` function had a hardcoded
`required_parameters` variable because it was only used in the Slack
data importer. This commit refactors `required_parameters` into a
function parameter, enabling the function to check a Slack token’s scope
for other purposes, such as Slack webhook integration.
Additionally, this commit changes the Slack API call in
`check_token_access` from `teams.info` to `api.test`. The endpoint is
better suited for this purpose since we're only checking a token’s scope
using the response header here.
- Modified compose logic to hide warning banners when error banners
(e.g., no post permissions) are visible, removing irrelevant information
during critical errors.
Fixes#25575.
Co-authored-by: joshyhz <joshyap.dev@gmail.com>
This commit introduces a new non-operational
`moderation_request_channel` field to the server/API. This setting will
support a feature allowing users to flag or report abusive content
(harassment, spam, etc.).
Fixes part of #20047.
Since we allow calling `add_messages` without checking fetch status,
it can lead to non-contiguous message history due to latest message
being added to a message list without previous messages being
fetched.
To fix it, we only allow adding new messages via message_fetch
which properly sets `anchor` to the last message in the list
before fetching and adding messages to the list.
We update the fetch status before reaching here, so it was
incorrect to return before adding messages to the message
list data since it is always cached.