Commit Graph

18305 Commits

Author SHA1 Message Date
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