Commit Graph

18160 Commits

Author SHA1 Message Date
Lauryn Menard d10ad01997 help: Rename and redirect archive-a-stream for channel. 2024-05-03 13:05:57 -07:00
Lauryn Menard c1175f2e55 help: Rename and redirect change-the-privacy-of-a-stream for channel. 2024-05-03 13:05:57 -07:00
Lauryn Menard 500f476de9 help: Rename and redirect change-the-stream-description for channel.
This also contains in-file edits for help/message-retention-policy.md,
help/create-a-channel.md, and help/configure-automated-notices.md.
2024-05-03 13:05:54 -07:00
Lauryn Menard c10c570b89 help: Rename and redirect rename-a-stream for channel. 2024-05-03 13:02:20 -07:00
Lauryn Menard b714bd9eec help: Rename and redirect set-default-streams-for-new-users for channel. 2024-05-03 13:02:20 -07:00
Lauryn Menard fbc66f45ea help: Rename and redirect configure-who-can-invite-to-streams re:channel. 2024-05-03 13:02:20 -07:00
Lauryn Menard c65c2b4a33 help: Rename and redirect configure-who-can-create-streams re:channel. 2024-05-03 13:02:20 -07:00
Lauryn Menard c931966e1b help: Rename and redirect stream-sending-policy for channel. 2024-05-03 13:02:20 -07:00
Lauryn Menard 5342d4ecfb help: Rename and redirect stream-permissions for channel. 2024-05-03 13:02:19 -07:00
Lauryn Menard 95b03ce6e1 help: Rename and redirect manage-user-stream-subscriptions for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 859340c914 help: Rename and redirect mute-a-stream for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 4908f1c5dc help: Rename and redirect stream-notifications for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard d97571e1df help: Rename and redirect manage-inactive-streams for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 93dd1e9b25 help: Rename and redirect move-content-to-another-stream for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 4f97c7b202 help: Rename and redirect change-the-color-of-a-stream for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 47ecc4989d help: Rename and redirect pin-a-stream for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 696f578c8e help: Rename and redirect add-or-remove-users-from-a-stream for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard a4c63c5ad0 help: Rename and redirect view-stream-subscribers for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 049ce10b6f help: Rename and redirect unsubscribe-from-a-stream for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard b4e67ee564 help: Rename and redirect browse-and-subscribe-to-streams for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 9c353d812e help: Rename and redirect message-a-stream-by-email for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard bd91c82862 help: Rename and redirect create-a-stream for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 14b899eb20 help: Rename and redirect create-streams for channel. 2024-05-03 12:55:39 -07:00
Lauryn Menard 4dbda25e2e help: Rename and redirect streams-and-topics for channel. 2024-05-03 12:55:39 -07:00
Mateusz Mandera eed98edb9d help: Document configuration of SCIM with Microsoft Entra ID. 2024-05-02 18:12:21 -07:00
Tim Abbott 0a756c652c push_notifications: Shard mobile push notifications. 2024-05-02 14:25:10 -07:00
Alex Vandiver 572fbfe114 queue_processors: Pass the worker_num down into the class. 2024-05-02 14:25:10 -07:00
Alex Vandiver 952291e712 migrations: Clean up non one-to-one confirmations/invites.
These models should be one-to-one.  Various bugs in the past have
leaked violations in both directions; we clean them up such that every
PreregistrationUser which is not a multi-use invite has exactly one
Confirmation object associated with it.

Fixes: #22025
2024-05-02 14:23:04 -07:00
Alex Vandiver 594e2823a7 invites: Use transactions more consistently. 2024-05-02 14:23:04 -07:00
Alex Vandiver 9dfaa83aa8 invites: Remove invites worker, make confirmation object in-process.
The "invites" worker exists to do two things -- make a Confirmation
object, and send the outgoing email.  Making the Confirmation object
in a background process from where the PreregistrationUser is created
temporarily leaves the PreregistrationUser in invalid state, and
results in 500's, and the user not immediately seeing the sent
invitation.  That the "invites" worker also wants to create the
Confirmation object means that "resending" an invite invalidates the
URL in the previous email, which can be confusing to the user.

Moving the Confirmation creation to the same transaction solves both
of these issues, and leaves the "invites" worker with nothing to do
but send the email; as such, we remove it entirely, and use the
existing "email_senders" worker to send the invites.  The volume of
invites is small enough that this will not affect other uses of that
worker.

Fixes: #21306
Fixes: #24275
2024-05-02 14:23:04 -07:00
Alex Vandiver 512d53d01a invites: Stop adjusting invited_at on resends. 2024-05-02 14:23:04 -07:00
Alex Vandiver d863aa56de invites: Lock the realm when determining invitation counts.
This prevents users from hammering the invitation endpoint, causing
races, and inviting more users than they should otherwise be allowed
to.

Doing this requires that we not raise InvitationError when we have
partially succeeded; that behaviour is left to the one callsite of
do_invite_users.

Reported by Lakshit Agarwal (@chiekosec).
2024-05-02 14:23:04 -07:00
Alex Vandiver eef5d22944 invites: Make notify_invites_changed transaction-safe. 2024-05-02 14:23:04 -07:00
Alex Vandiver e48d5e4ad2 invites: Split out some functions from zerver.actions.invites.
This will avoid a circular dependency in future commits.
2024-05-02 14:23:04 -07:00
Prakhar Pratyush b17a006bf0 data_import: Remove gitter data import tool.
Gitter broke their older API as part of being integrated
into Matrix.

Their announcement blog says:
"Anything left using the Gitter APIs will need to be
updated to use the Matrix API"

This commit drops the legacy Gitter import tool and
we plan to build a new one for Matrix in future.
2024-05-02 13:25:25 -07:00
Tim Abbott d1921aed26 zulip_updates: Fix typo. 2024-04-30 18:13:18 -07:00
Alya Abbott 89717e767f updates: Add update message (level=3). 2024-04-30 17:53:44 -07:00
Lauryn Menard 8e953d9896 streams-settings-overlay: Update hash for stream to channel rename.
Updates the base hash for the streams setting overlay to be
"channels" instead of "streams".

Because there are Welcome Bot and Notification Bot messages that
would have been sent with the "/#streams" hash, we will need to
support parsing those overlay hashes as an alias for "/#channels"
permanently.

Part of the stream to channels rename project.
2024-04-30 14:44:12 -07:00
Vector73 de90d0acdf message_delete: Update "first_message_id" on message deletion.
We now "first_message_id" of the stream on the deletion of the first
message that was sent to it. This results in 1 extra query when any
stream message is deleted and 3 extra queries when the first message
sent to any stream is deleted.

Fixes #28877.
2024-04-30 14:15:22 -07:00
N-Shar-ma d64d535c2d todo: Require space after colon to separate task title from description.
This fixes the annoying behaviour where a task title with a url in it,
for example, "Fix issue https://github/com/zulip/zulip/issues/1234"
would be wrongly split into a description at the `:` in the url.
2024-04-30 12:36:42 -07:00
Anders Kaseorg d32d4434dd partial: Replace returns plugin with an annotation.
The returns plugin hasn’t been updated for mypy ≥ 1.6.  This
annotation is more limited in that it only supports a fixed number of
positional arguments and no keyword arguments, but is good enough for
our purposes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-29 17:14:41 -07:00
Anders Kaseorg 87f228fcb0 test_events: Switch verify_action to a context manager API.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-29 17:14:41 -07:00
Anders Kaseorg 9efba89a43 test_invite: Use context manager form of assertRaises.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-29 17:14:41 -07:00
Anders Kaseorg 6fef5c3e46 webhooks: Use partial with positional arguments.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-29 17:14:41 -07:00
Mateusz Mandera 5ff3f0d99a get_presence_dicts_for_rows: Remove dead code for mobile_user_ids.
The argument isn't used for anything anymore.
2024-04-29 17:07:18 -07:00
Mateusz Mandera 217161824f presence: Always run do_update_user_presence in a transaction.
It was already in a transaction in one of the two call points.
2024-04-29 17:07:18 -07:00
Lauryn Menard 62e17c987f exceptions: Add IncompatibleParametersError as a JsonableError.
Creates an IncompatibleParametersError to be used in cases where
there are two (or more) optional parameters for an endpoint that
are incompatible with each other, e.g. there's a parameter for a
user name and a user ID but only one should be sent in the request
to identify the user.

Documents the error on the /api/rest-error-handling article.

Updates the PATCH users/me/subscriptions/muted_topics endpoint to
use this error when both the stream and stream_id parameters are
passed (note this endpoint is currently deprecated).
2024-04-29 16:58:47 -07:00
Sahil Batra 7518d550f2 user_groups: Remove unneeded fields from UserGroup model.
This commit removes name, description, is_system_group and
can_mention_group fields from UserGroup model and rename
them in NamedUserGroup model.

Fixes #29554.
2024-04-26 17:03:09 -07:00
Sahil Batra 27558315a2 settings: Use named_user_group field to access name.
This commit updates code to access name from named_user_group
field which points to the "NamedUserGroup" instead of directly
accessing name from "UserGroup", since name field will only
be present on NamedUserGroup objects in further commits.
2024-04-26 17:03:09 -07:00
Sahil Batra e78d0aacaf tests: Use NamedUserGroup for queries. 2024-04-26 17:03:09 -07:00