Commit Graph

67179 Commits

Author SHA1 Message Date
Alex Vandiver
b3b9d2c3cc export: Use run_parallel for rewriting UserMessage data. 2025-11-05 11:49:55 -08:00
Alex Vandiver
a815261abf export: Stop calling processes threads. 2025-11-05 11:49:55 -08:00
Alex Vandiver
131580f23c parallel: Factor out multiple callsites that use ProcessPoolExecutor. 2025-11-05 11:49:55 -08:00
PieterCK
454905f988 mattermost_importer: Support converting duplicate channel names.
Mattermost channel display names are not unique.
2025-11-05 11:37:04 -08:00
PieterCK
cd061ac7a5 mattermost_importer: Truncate long channel name. 2025-11-05 11:37:04 -08:00
Evy Kassirer
bf4b808d80 setup-recommended: Be more clear about needing to turn gRPC FUSE back on. 2025-11-05 11:35:04 -08:00
PieterCK
d42862f44f channels: Add confirmation for archiving moderation request channel. 2025-11-05 11:20:32 -08:00
PieterCK
daa14bb3c4 message_actions: Add "Report message" action and settings UI.
This adds a new field in the "Organization settings" menu for the
moderation request channel. It only includes private channels as the
dropdown options.

Fixes #20047.

Co-authored-by: Adam Sah <140002+asah@users.noreply.github.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2025-11-05 11:20:32 -08:00
PieterCK
25f0fb1ab2 condenser: Support customizing label for length toggle button.
This is a prep commit to use the module for showing/hiding message
preview in the report message modal.
2025-11-05 11:20:32 -08:00
Vector73
9ec4c04f2f tools: Fix notify-if-api-docs-changed tool.
Fixed feature level in topic name where notification is sent. Also,
changelog entries will be included in the notification message instead
of only changed endpoints.
2025-11-05 09:38:07 -08:00
Lauryn Menard
c273669203 corporate: Add additional licenses in one invoice item.
So that we don't exceed the limit of 250 invoice items for a Stripe
invoice, we bundle additional license ledger entries into a single
invoice item when we invoice the plan.
2025-11-05 09:35:41 -08:00
Lauryn Menard
e73955c313 corporate: Create helper functions for type of invoice item params.
Creates separate helper functions for building the invoice item
parameters for the two types of plan items: renewals and additional
licenses.
2025-11-05 09:35:41 -08:00
Lauryn Menard
9bd2b0e8f0 corporate: Refactor building invoice item parameters in invoice_plan.
Pulls data that's shared for both renewal invoice items and
additional license invoice items to the beginning of the
loop over LicenseLedger entries.
2025-11-05 09:35:41 -08:00
Lauryn Menard
db737d4cfc corporate: Extract helper for adding flat discount to invoice. 2025-11-05 09:35:41 -08:00
Lauryn Menard
12756462ac corporate: Extract helper for creating stripe.Invoice object. 2025-11-05 09:35:41 -08:00
Aman Agrawal
06a7dca45f stripe: Upgrade to latest version. 2025-11-05 09:35:41 -08:00
PieterCK
cb62bb481a slack_importer: Add documentation for required token scopes. 2025-11-05 09:06:55 -08:00
PieterCK
7f45cfccbb slack_importer: Add validation to check_slack_token_access.
This makes sure the required_scopes is not accidentally an empty set or
list.
2025-11-05 09:06:55 -08:00
PieterCK
1ab1ee4e0b slack_util: Rename check_token_access to check_slack_token_access. 2025-11-05 09:06:55 -08:00
PieterCK
a584b977db export_consent: Include users email visibility policy in the response.
This updates the `/export/realm/consents` API endpoint to also include
`email_address_visibility` field for each item in the `export_consents`
object.

This is a prep commit to add a warnings in the "Start export?"
confirmation modal for when there are no usable owner account.
2025-11-04 18:15:36 -08:00
PieterCK
d1e5ed8971 export: Allow generating export with no usable owner account.
8ab400b95d adds a couple guardrails
againts generating an exporting realm with no usable owner and admin
accounts.

As per #34275, this commit lifts these guardrails to allow generating
export with no usable owner accounts. Export data without usable user
account might still have other uses other than for import.
2025-11-04 18:15:36 -08:00
Aman Agrawal
7d617e3382 compose_validate: Rename function to avoid confusion.
This function doesn't perform any checks, renamed the function
name to clarify that.
2025-11-04 17:10:10 -08:00
Aman Agrawal
a89a1893c5 compose: Don't check for posting policy errors without validation.
Since `compose_validate.validate` sets the error messages
for posting policy, it is important that it is called before
we check for posting policy errors.

To fix it, we remove independent calls to
check_posting_policy_for_compose_box and call it after validation.

This also fixes a bug where compose posting policy error is
not displayed when a user is trying to DM a recipient with no
previous message history and the user is not allowed to start
a new DM conversation.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-11-04 17:10:10 -08:00
Nirvedh Harpal
b0b8427c7f settings: Fix alignment of deactivate buttons in account settings.
Replace fixed margin approach with flexbox layout for proper horizontal
alignment of "Deactivate account" and "Deactivate organization" buttons.
Includes responsive design for narrow screens.

Fixes #36104.
2025-11-04 16:58:27 -08:00
Alya Abbott
52a782895a github: Update template for topic permalinks and HTML links. 2025-11-04 16:11:55 -08:00
PieterCK
62aea71c31 slack_integration_doc: Update the "install to workspace" instructions. 2025-11-04 16:10:13 -08:00
PieterCK
a65ca316ec slack_import_doc: Update the "install to workspace" instruction. 2025-11-04 16:09:42 -08:00
PieterCK
3482f86822 slack_import_doc: Fix text formatting on an instruction.
We bold the feature's name when refering to them.
2025-11-04 16:08:10 -08:00
Alex Vandiver
cfc6b33eaa settings: Clarify that display_icon can be a full URL. 2025-11-04 16:06:20 -08:00
Alex Vandiver
f5095c6436 api: Clarify that display_icon can be a relative URL. 2025-11-04 16:06:20 -08:00
Alya Abbott
7cd0a8e60b github: Request description of testing process.
Prompted by an increase in AI-generated PRs.
2025-11-04 14:41:32 -08:00
Alya Abbott
1fe959b803 imports: Explain how to return to import process. 2025-11-04 13:18:34 -08:00
Alya Abbott
bc95fa3e3e imports: Simplify field label. 2025-11-04 13:18:34 -08:00
Evy Kassirer
8c7d6d9157 stream_list: Exclude archived channels from subscribe stream count.
Reported here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/.22Browse.20.2E.2E.2E.20more.20channels.22.20should.20not.20count.20archived/near/2289067

This logic has had this latent bug since the count was introduced in
4a34b7d18e, but the bug only became
relevant when it became possible to remain subscribed to archived
channels last year.
2025-11-04 13:17:27 -08:00
Prakhar Pratyush
eefb88f0ea push_notification: Fix invalid data arg to firebase_messaging.Message.
Earlier, we were passing invalid `data` argument to
`firebase_messaging.Message` which would result in an error while
sending E2EE push notification for android devices.

The API requires all keys and values in the `data` dictionary
to be strings. One of the value was an integer.

This commit fixes the bug by converting the values to str if they
are not.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-04 12:39:39 -08:00
Tim Abbott
f5eac9282b push_notifications: Use a set comprehension. 2025-11-04 12:39:39 -08:00
Tim Abbott
f85b55e624 lint: Fix a couple issues with migration 0756. 2025-11-04 12:26:41 -08:00
Prakhar Pratyush
7ebaa9f4e4 push_notifications: Replace pm_users field with recipient_user_ids.
The encrypted push notification payload previously included a `pm_users`
field for group direct messages.

This commit replaces the `pm_users` field with `recipient_user_ids`.
(new name to migrate from the old "private" keyword)

It's a sorted array of all user IDs participating in a 1:1 or group DM
conversation, including both `user_id` and `sender_id`.

* Previously, `pm_users` was included only for group DMs;
`recipient_user_ids` is present for both 1:1 and group DM conversations.

* The old `pm_users` field was a string containing a comma-separated
list of sorted user IDs. `recipient_user_ids` has a more structured
array format.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-04 12:21:40 -08:00
Sahil Batra
9592d91b68 streams: Add migration for anonymous group used for multiple streams.
This migration handles cases where same anonymous group was used
for a setting of multiple streams by creating new anonymous groups
for them with the same set of members and subgroups. This was
possible when multiple streams were created in a single request
to "POST /users/me/subscriptions" endpoint.
2025-11-04 11:56:37 -08:00
Sahil Batra
1d026d9b2b streams: Make sure an anonymous group is used for only one setting.
When creating multiple streams using "POST /users/me/subscriptions"
endpoint, same anonymous group was being used for settings of all
the streams, like if can_subscribe_group was being set to an
anonymous group, all streams created using that endpoint would
use the same anonymous group for can_subscribe_group setting.

Using the same anonymous groups for multiple streams caused
unintended behavior  -

- Changing a setting for one stream also changed it for all
other streams sharing the the same anonymous group, because
eventually the members and subgroups of the group were updated.

- Changing the setting to a named user group failed because
`do_change_stream_permission_group` attempts to delete the
anonymous group during the update. However, deletion of
anonymous group is restricted if they are still referenced
by setting fields.

This commit fixes this so that one anonymous group is used
only for one setting for a single stream.
2025-11-04 11:51:31 -08:00
Shubham Padia
7bd0c37d3c stream_events: Remove remove_deactivated_user_from_all_streams.
We changed the API in 53983c9 so that the server nows sends explicit
peer_remove events before the deactivation event. This means that we
should not have to remove subscribers when receiving a user deactivation
event.

We convert the existing function to raise a blueslip error instead if
our understanding of the system is somehow wrong. That way the error
would be caught instead of slipping through the cracks.
2025-11-04 11:14:59 -08:00
Shubham Padia
3057f4bc6d users: Send peer_remove for archived streams as well on deactivation.
Users are removed from archived streams as well on deactivation. Since
archived stream subscriber list is also visible in channel settings, we
should send peer_remove for it as well.
2025-11-04 11:14:59 -08:00
Prakhar Pratyush
e15edc84c2 desktop_notification: Fix error when message deleted while narrowing.
Earlier:
When a user clicked the desktop notification, but before we finished
processing that click, the message deletion got processed.
It resulted in an error.

This commit fixes the bug by taking the user to the conversation
where the now-deleted message had been prior to deletion -
narrow to the message's near view.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-04 11:03:36 -08:00
Shubham Padia
84bb07a652 user_profile: Fix incorrect keyboard shortcut for send direct messages.
https://chat.zulip.org/#narrow/channel/9-issues/topic/send.20DM.20shortcut.20on.20user.20card/near/2286884
2025-11-04 10:18:54 -08:00
Lauryn Menard
87d08954ff corporate: Update topics for new org creation to include org type. 2025-11-04 08:53:54 -08:00
Alya Abbott
aa0406a07a help: Document image cropping for profile pictures.
Documents changes made in #36038. Also:

- Updates docs follow modern patterns and describe up-to-date UI.
- Sets expectation that users should upload custom avatars.
2025-11-04 08:53:13 -08:00
Alex Vandiver
45fc5c36df puppet: Add a postfix.uninstall flag to allow skipping that step. 2025-11-04 08:35:42 -08:00
Sahil Batra
649a518b19 upload-widget: Add support to crop realm logo, icon and user avatar.
This commit adds code to support cropping realm logo, icon and
user avatar using "ImageEditor" plugin from Uppy.

We do not use Dashboard plugin from Uppy, which is the default
way to allow cropping using Uppy, since we do not want to
show dashboard UI from uppy and we would need some workarounds
which are not trivial to not show the dashboard UI in the upload
workflow.

Fixes part of #24324.
2025-11-03 16:55:04 -08:00
Sahil Batra
fddc9582ff dependencies: Add @uppy/image-editor plugin.
This is needed because we will add support to crop realm
logo, icon and user avatar in further commits.
2025-11-03 16:55:04 -08:00
PieterCK
57c07bcf03 slack_integration: Avoid showing sender username.
The "name" field included in the users.info API response is actually the
senders Slack username, which may be the prefix of their email address.

This updates the integration to use the "real_name" field instead, which
is the senders full name.

Fixes #36090.
2025-11-03 16:42:07 -08:00