Commit Graph

18374 Commits

Author SHA1 Message Date
Prakhar Pratyush 4deecfa58d zulip_updates: Fix assertion error while sending update messages.
Earlier, for new realm with zulip_update_announcements_stream
set to None, an assertion error was raised in
'is_group_direct_message_sent_to_admins_within_days' because
no 'None' to new level change took place for such realm.

A new realm is on the latest level and a default stream is set.

This commit updates the logic to simply skip sending
update messages as the stream was manually set to None
in such cases.
2024-05-30 10:52:32 -07:00
Prakhar Pratyush 1ce7c11705 user_profile: Remove 'onboarding_steps' field.
Removes the 'onboarding_steps' field on 'UserProfile'
model which is no longer used.

It was introduced back in 2013 (b5e22bf), and is no
longer used.

Fixes part of #30043.
2024-05-29 16:12:35 -07:00
Lauryn Menard 842fdb55d3 api-docs: Update feature level 256 changelog and changes notes.
The original feature level updates were made in commit de90d0acdf.
2024-05-28 10:45:21 -07:00
Sahil Batra aa84080ad6 tests: Add a helper function to create anonymous groups.
This commit adds a new helper function to create or update
a UserGroup object for a setting. We could have used existing
update_or_create_user_group_for_setting but that also validates
user IDs and subgroup IDs which we can skip in tests.
2024-05-28 07:24:07 -07:00
Sahil Batra 81765a1e83 user_groups: Fix audit log data when changing group settings.
This commit fixes the code store correct old value in audit
log data when changing can_mention_group setting from a
anonymous group to another anonymous group. The bug was
because the old value was being computed after updating
the UserGroup object with new members and subgroups and
is fixed by computing the old value for all the cases
and passing it to do_change_user_group_permission_setting.
2024-05-28 07:24:07 -07:00
Mateusz Mandera c0bf67d6da import: Check off old, redundant TODO about huddle import.
This was added long ago in
38dd9e49de

Double-checked that this is right and added a brief mention of what
exactly the dependency here is.
2024-05-25 23:01:41 -07:00
Alex Vandiver b7bf9e41c7 markdown: Catch urllib3 exceptions which are raised during streaming.
requests transforms the base urllib3 exceptions into
requests.RequestExceptions -- but only within code that it is
running.  When parsing the streaming body in fetch_open_graph_image,
the read itself (inside lxml) may trigger urllib3 to raise its own
timeout error -- which escapes the current catch of
requests.RequestExceptions.

Catch both requests and urllib3 exceptions.
2024-05-24 14:54:53 -07:00
Vector73 fef31614d3 zerver: Replace occurrences of uri with url in other templates.
This commit replaces occurrences of realm_uri with realm_url in
"context_processors.py" and related templates.

With by-hand translation updates for German (also updated in
Transifex) to avoid breaking the i18n system tests that use some
modified strings.

Co-authored-by: Junyao Chen <junyao.chen@socitydao.org>
2024-05-24 11:18:35 -07:00
Vector73 93262e03ad emails: Replace occurrences of uri with url in email templates.
This commit replaces occurrences of realm_uri with realm_url in email templates
and other related backend files.

Co-authored-by: Junyao Chen <junyao.chen@socitydao.org>
2024-05-24 11:18:35 -07:00
Alex Vandiver cb2a105de2 message: Respect first_visible_message_id when computing unreads.
This prevents unread counts for messages which the web UI does not
display, and does not let you mark as unread via "mark all as read."
2024-05-24 10:50:19 -07:00
Alex Vandiver e73e44402a export_search: Support --dm with one user, for all their DMs. 2024-05-24 10:49:52 -07:00
Alex Vandiver 2218de0399 management: Disable Sentry for management commands run interactively.
This adds `--automated` and `--no-automated` flags to all Zulip
management commands, whose default is based on if STDIN is a TTY.
This enables cron jobs and supervisor commands to continue to report
to Sentry, and manually-run commands (when reporting to Sentry does
not provide value, since the user can see them) to not.

Note that this only applies to Zulip commands -- core Django
commands (e.g. `./manage.py`) do not grow support for `--automated`
and will always report exceptions to Sentry.

`manage.py` subcommands in the `upgrade` and `restart-server` paths
are marked as `--automated`, since those may be run semi-unattended,
and they are useful to log to Sentry.
2024-05-24 10:30:16 -07:00
Alex Vandiver 88be3246a0 management: Move commands to all use ZulipBaseCommand. 2024-05-24 10:30:16 -07:00
Alex Vandiver 174ae2b409 zulip_update: Catch and carry on if a realm fails.
It is better to log the exception and _try_ all realms, than to fail
early due to a bad realm and fail to notify the rest.
2024-05-24 10:21:45 -07:00
Alex Vandiver 5c2fd1de5a docs: Update Django links to our current version. 2024-05-24 10:18:37 -07:00
Prakhar Pratyush 0ce79c8c50 message_edit: Update do_update_message codepath to send event on commit.
Earlier, we were using 'send_event' in 'do_update_message'
which can lead to a situation where we enqueue events but
the transaction fails at a later stage.

Events should not be sent until we know we're not rolling back.
2024-05-24 10:17:35 -07:00
Prakhar Pratyush bca8338ee1 do_update_embedded_data: Change send_event to send_event_on_commit.
Earlier, we were using 'send_event' which can lead to a situation
where we enqueue events but the transaction fails at a later stage.

Events should not be sent until we know we're not rolling back.
2024-05-24 10:17:35 -07:00
Alex Vandiver e5a0b3b3c5 zilencer: Disambiguate no MX records from the domain not existing.
This switches to dnspython, since it offers the higher-level
`resolve_name` method to look up both A and AAAA records, and set
timeouts.
2024-05-24 09:34:31 -07:00
Alex Vandiver 9d66a8eb73 zilencer: Give a better error message for foo@example.com emails. 2024-05-24 09:34:31 -07:00
Vector73 62dfd93a83 api: Add "users/<int:user_id>/status" endpoint.
The documentation Creates a shared UserStatus schema that's used for
the return value of this new endpoint and for the existing user_status
objects returned by the register queue endpoint.

Co-authored-by: Suyash Vardhan Mathur <suyash.mathur@research.iiit.ac.in>

Fixes #19079.
2024-05-22 18:07:22 -07:00
Vector73 d6672c57ff user_status: Rename `get_user_status_dict` function.
Renames `get_user_status_dict` function to `get_all_users_status_dict`
to distinguish it from new `get_user_status` function.
2024-05-22 18:07:22 -07:00
Sahil Batra d1bcac0822 realm: Use enums for accessing setting values.
This commit updates code, majorly in tests, to use
setting values from enums instead of directly using
the constants defined in Realm.

We still have those constants defined Realm as they
are used in a couple of places where the same code
is used for different settings. These will be
handled later.
2024-05-22 17:20:37 -07:00
Sahil Batra 52b0199189 realm: Migrate "PATCH /realm" endpoint to typed_endpoint. 2024-05-22 17:20:37 -07:00
Sahil Batra 5d3a0ce94a realm: Add enums for setting values.
This is a prep commit to migrate "PATCH /realm" endpoint to use
"typed_endpoint".
2024-05-22 17:20:37 -07:00
Sahil Batra 5737d4c483 create_user: Fix comment in set_up_streams_for_new_human_user.
This commit fixes comment about subscribing to default streams
in set_up_streams_for_new_human_user to explain the current
logic after changes in 69ba580a54.
2024-05-22 11:34:27 -07:00
Prakhar Pratyush c91d018b38 user_topics: Make bulk_set_user_topic_..._in_database atomic.
In e726012244, we removed the
@transaction.atomic decorator from the function
'bulk_set_user_topic_visibility_policy_in_database'.

We should keep it to avoid adding it to the caller
of this function, when reused in the future.
2024-05-21 09:24:43 -07:00
Prakhar Pratyush 23c2ce1671 create_realm: Fix channel name and description not being translated. 2024-05-21 09:24:43 -07:00
Prakhar Pratyush 508c5611d1 claim_attachment: Remove the stale 'user_profile' parameter.
This commit removes the unused 'user_profile' parameter
of the 'claim_attachement' function.
2024-05-21 09:24:43 -07:00
Tim Abbott 330439a83b zulip_updates: Wrap differently to workaround bug.
The bold syntax appearing on the start of a line made this render badly.
2024-05-20 18:01:04 -07:00
Alya Abbott 0decaef284 updates: Add update about stream->channel rename and faster loading. 2024-05-20 16:31:55 -07:00
Sahil Batra 2007a582a1 message: Optimize checking if mentioning user group is allowed.
This commit updates the code to not call is_user_in_group
function if can_mention_group setting is set to "role:everyone"
group.
2024-05-20 14:43:07 -07:00
Sahil Batra eec80a4a5a message: Fix code to check group mention permission.
This commits fixes the code which checks group mention permission
to handle anonymous user groups correctly. Basically we were
not checking whether the UserGroup is linked to a NamedUserGroup
and directly accessing named_user_group which results in an
error.

We also update the error messages to include the group name
which has permission to mention the groups since now there
might be a comnbination of groups and users who has permission
to mention the group.

This commit also adds tests to check sending and editing messages
when can_mention_group is set to a anonymous user group.
2024-05-20 14:43:07 -07:00
Kenneth Rodrigues ba92cd8b23
search: Include history for is:resolved queries.
The previous logic assumed that all `is:` operators were those like `is:muted`
or `is:starred`, which depend on personal data.
2024-05-20 14:37:08 -07:00
Anders Kaseorg b545abe1e2 typos: Fix typos caught by mwic.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-20 13:55:00 -07:00
Anders Kaseorg 38cae070ed typos: Fix typos caught by typos.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-20 13:55:00 -07:00
Lauryn Menard c3577d9cdd api-docs: Update python example user-facing comments for channel.
Updates python usage example comments, which are user-facing, to
use channel instead of stream.

Part of the stream to channel rename project.
2024-05-20 11:30:25 -07:00
Lauryn Menard 016ffd8078 api-docs: Update python tests to not use "stream" in channel name.
Updates the channel names in python example tests to use "-channel"
instead of "_stream".

Part of stream to channel rename project.
2024-05-20 11:27:03 -07:00
Lauryn Menard c77c37be27 api-docs: Rename user-facing python example channel to "python-test".
Renames the test channel created and used in python usage examples
to "python-test" instead of "new stream".

Part of stream to channel rename project.
2024-05-20 11:27:03 -07:00
Lauryn Menard deec077925 api-docs: Update python usage example for archive_stream.
Even though there was a stream/channel ID being passed to the test
function for archive_stream, it wasn't being used in the test as
it was reset to a new stream created/subscribed in the function.

Updates the test function to remove the unused stream/channel ID
parameter, and updates the usage example for to use channel instead
of stream where appropriate.

Part of stream to channel rename project.
2024-05-20 11:27:03 -07:00
Lauryn Menard af5d618879 api-docs: Update comments in javascript usage examples for channel.
Updates comments that are displayed in the javascript examples for
various endpoints to use channel instead of stream.

Part of stream to channel rename project.
2024-05-20 11:27:03 -07:00
Lauryn Menard 7644c83cca api-docs: Update narrow usage examples for get_messages.
Updates narrow parameters in the javascript and python usage
examples for the get_messages endpoint to use the "channel"
operator instead of the "stream" operator.

Part of the stream to channel rename project.
2024-05-20 11:27:03 -07:00
Lauryn Menard f39e4e8087 api-docs: Change "streams" tag to "channels" in zulip.yaml. 2024-05-20 09:31:56 -07:00
Lauryn Menard 89af513d3a api-docs: Update /calls/bigbluebutton/create for channel.
Updates the API doc for /calls/bigbluebutton/create endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard c219136e4c api-docs: Update POST /typing for channel.
Updates the API doc for POST /typing endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 427b86aff6 api-docs: Update /streams/{stream_id}/delete_topic for channel.
Updates the API doc for /streams/{stream_id}/delete_topic endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard e29e4872f3 api-docs: Update /streams/{stream_id}/email_address for channel.
Updates the API doc for /streams/{stream_id}/email_address endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 06b18411fe api-docs: Update PATCH /streams/{stream_id} for channel.
Updates the API doc for PATCH /streams/{stream_id} endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 75b635d3bc api-docs: Update DELETE /streams/{stream_id} for channel.
Updates the API doc for DELETE /streams/{stream_id} endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard c45aba51aa api-docs: Update GET /streams/{stream_id} for channel.
Updates the API doc for GET /streams/{stream_id} endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 3d9a0aaf90 api-docs: Update GET /streams for channel.
Updates the API doc for GET /streams endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 2b71875676 api-docs: Update GET /streams/{stream_id}/members for channel.
Updates the API doc for GET /streams/{stream_id}/members endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard dfc6eab8a0 api-docs: Update PATCH /settings for channel.
Updates the API doc for PATCH /settings endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 8a0c8cecf8 api-docs: Update GET /server_settings for channel.
Updates the API doc for GET /server_settings endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard c87715a6ff api-docs: Update POST /register for channel.
Updates the API doc for POST /register endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard f88fa28f55 api-docs: Update POST /invites/multiuse for channel.
Updates the API doc for POST /invites/multiuse endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 8161bc16c8 api-docs: Update POST /invites for channel.
Updates the API doc for POST /invites endpoint to use channel in
descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard a4f4e61eef api-docs: Update POST /users/me/subscriptions/properties for channel.
Updates the API doc for POST /users/me/subscriptions/properties
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard b74ee5f740 api-docs: Update PATCH /realm/user_settings_defaults for channel.
Updates the API doc for PATCH /realm/user_settings_defaults
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 0fefbdd5b3 api-docs: Update DELETE /realm/emoji/{emoji_name} for channel.
Updates the API doc for DELETE /realm/emoji/{emoji_name}
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 66f93cf9d3 api-docs: Update /users/{user_id}/subscriptions/{stream_id} for channel.
Updates the API doc for /users/{user_id}/subscriptions/{stream_id}
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 9717aeea43 api-docs: Update /users/me/muted_users/{muted_user_id} for channel.
Updates the API doc for /users/me/muted_users/{muted_user_id} endpoint
to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 880ab441f6 api-docs: Update POST /user_topics for channel.
Updates the API doc for POST /user_topics endpoint to use channel in
descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard c34e3a9eba api-docs: Update PATCH /users/me/subscriptions/muted_topics for channel.
Updates the API doc for PATCH /users/me/subscriptions/muted_topics
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 785b036a55 api-docs: Update DELETE /users/me/subscriptions for channel.
Updates the API doc for DELETE /users/me/subscriptions endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 8a75476cb6 api-docs: Update PATCH /users/me/subscriptions for channel.
Updates the API doc for PATCH /users/me/subscriptions endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 62cac75ebc api-docs: Update POST /users/me/subscriptions for channel.
Updates the API doc for POST /users/me/subscriptions endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 1f6a01eb28 api-docs: Update GET /users/me/subscriptions for channel.
Updates the API doc for GET /users/me/subscriptions endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard a090dc32a1 api-docs: Update /users/me/{stream_id}/topics for channel.
Updates the API doc for /users/me/{stream_id}/topics endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 559ba55690 api-docs: Update PATCH /messages/{message_id} for channel.
Updates the API doc for PATCH /messages/{message_id} endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard bc421afa25 api-docs: Update GET /messages/matches_narrow for channel.
Updates the API doc for GET /messages/matches_narrow endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 551791ca16 api-docs: Update POST /messages/flags for channel.
Updates the API doc for POST /messages/flags endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 03b0a8785a api-docs: Update GET /messages/{message_id}/history for channel.
Updates the API doc for GET /messages/{message_id}/history endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard fd9e9c6207 api-docs: Update POST /messages for channel.
Updates the API doc for POST /messages endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard aea4216970 api-docs: Update GET /messages for channel.
Updates the API doc for GET /messages endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard ce047d5c5a api-docs: Update DELETE /default_streams for channel.
Updates the API doc for DELETE /default_streams endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 43cb33df1a api-docs: Update POST /default_streams for channel.
Updates the API doc for POST /default_streams endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 4d0325da99 api-docs: Update /scheduled_messages/{scheduled_message_id} for channel.
Updates the API doc for PATCH /scheduled_messages/{scheduled_message_id}
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 3d33490a32 api-docs: Update descriptions in POST /scheduled_message for channel.
Updates the API documentation for the POST /scheduled_message endpoint
to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 3c11872ebd api-docs: Update descriptions in POST /drafts for channel.
Updates the API documentation for the POST /drafts endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard ff49567c16 api-docs: Update descriptions in /mark_topic_as_read for channel.
Updates the API documentation for the /mark_topic_as_read endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard b8a91278f6 api-docs: Update descriptions in /mark_stream_as_read for channel.
Updates the API documentation for the /mark_stream_as_read endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 030863a585 api-docs: Update descriptions in /get_stream_id for channel.
Updates the API documentation for the /get_stream_id endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 46b9456b31 api-docs: Use "Channel" for components schema names in zulip.yaml.
Part of stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard 6c643f2530 api-docs: Update descriptions in shared schemas to use channel.
Updates field descriptions in schema components and parameters to
use channel instead of stream.

Part of stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard d44196bed2 api-docs: Update get-events description text to use channel.
Updates description's in /api/get-events to use channel instead
of stream.

Note that any shared schemas used for this endpoint's documentation
will be updated in other commits in this series.

Part of stream to channel rename project.
2024-05-20 09:31:56 -07:00
bedo acec5108c5 import/export: Map each message id to its attachments.
Fixes #29350
2024-05-20 09:18:49 -07:00
Prakhar Pratyush c798d192dc message_send: Update do_send_messages codepath to send event on commit.
Earlier, we were using 'send_event' & 'queue_json_publish' in
'do_send_messages' which can lead to a situation where we enqueue
events but the transaction fails at a later stage.

Events should not be sent until we know we're not rolling back.
2024-05-19 23:18:43 -07:00
Mateusz Mandera 27c4e46b30 do_deactivate_realm: Add deactivation_reason kwarg.
It's going to be helpful in the future to record the reason for realm
deactivation.
- For information tracking
- For making a distinction between cases where we can allow realm owners
  to reactivate their realm via a self-serve flow (e.g.
  "owner_request") vs where we can't (ToS abuse).
2024-05-19 23:07:28 -07:00
evykassirer 96c9950115 composebox_typeahead: Convert module to typescript. 2024-05-16 14:53:26 -07:00
Sahil Batra aa83812b1b user_groups: Rename are_both_setting_values_equal function.
This commit renames are_both_setting_values_equal function
to are_both_group_setting_values_equal to make it clear
that this function is used to compare value of group
settings.
2024-05-16 12:58:20 -07:00
Sahil Batra 7db7b3f94d groups: Move functions for updating settings to "lib.user_groups".
This commit moves validate_group_setting_value_change,
are_both_setting_values_equal and parse_group_setting_value
functions, which are used for updating the group settings, to
"zerver.lib.user_groups" as these functions will also be used for
group based realm and stream settings and "zerver.lib.user_groups"
file seems a better place to place such functions which are used
at multiple places.

For same reasons, we also move GroupSettingChangeRequest dataclass
to "zerver.lib.user_groups" file.
2024-05-16 12:58:20 -07:00
Tomas Fonseca 753b8e1f6f markdown: Added error handling for invalid time zones.
If an invalid timezone (such as +32h) was provided, the
timestamp.astimezone call would throw an exception, causing the
message send to fail. Replace that with a user-facing error.

Fixes #19658.
2024-05-16 09:38:25 -07:00
Aman Agrawal 7203661d99 support: Set discounted price instead percentage for customers.
This allows us to set the price of a plan exactly as discussed with
the customer.
2024-05-16 02:18:43 -07:00
Tim Abbott 1d52d08803 api_examples: Fix failing invitation links test.
This system is too fragile with hardcoded IDs; we should be asserting
that the preparatory requests succeeded to make these easier to debug.
2024-05-15 15:01:08 -07:00
Vector73 431beae96f api_documentation: Document "/invites/multiuse/{invite_id}" endpoint. 2024-05-15 12:05:40 -07:00
Lauryn Menard ab0fc402e0 api-docs: Update feature level 261 documentation.
The original changes for this feature level are in
commits a6be1d101 and 7b42c802b.
2024-05-15 21:01:05 +02:00
tnmkr 51635c81fc streams: Set creator for some initial streams in populate_db.
This is a follow-up to #29425. It assigns creator to three streams
that are used in tests and another two that aren't. For tests,
we assign a guest, an admin and an owner as creator.
2024-05-15 11:21:46 -07:00
Prakhar Pratyush e264b12066 zulip_updates: Send an introductory message before the first update.
To help users focus on the onboarding experience, we no longer
send the introductory "Zulip updates" message as a part of
onboarding.

Now, we send the introductory message just before the first
update message.

Fixes #30053.
2024-05-15 11:19:03 -07:00
Sahil Batra a85eb2110d test_message_move_topic: Define assert_has_visibility_policy once.
We just define assert_has_visibility_policy once instead of just
defining it in three different tests.
2024-05-15 10:57:23 -07:00
Sahil Batra 1811dd9b47 test_realm: Remove set_up_db.
This commit removes set_up_db, which called realm.save to
update the settings, and its calls are replaced with either
self.assertEqual (which is enough to verify the initial value)
or a "do_.." function call to set the setting to initial value.

It is better to avoid calling "realm.save" and instead use the
"do_.." functions to set the settings.

There are places where it is easy to just call "do_.." function
as default value is not the first value in the list of test values.
2024-05-15 10:57:23 -07:00