Creates a helper function `get_subscribed_stream_ids` to fetch
subscribed streams' ids of the client.
Updates various functions to remove hardcoded values in request
body and used available API calls to fetch them.
Previously, the "Changes" sections for narrows in the api_docs
used to mention the entire set of changes for the narrow. This
commit replaces it to rather refer to the changelog at
[Construct a narrow](/api/construct-narrow).
This avoids the risk of the details getting out of sync between
the different descriptions, and reduces the burden for updating
or editing them.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
This commit adds include_realm_default_subscriptions parameter
to the invite endpoints and the corresponding field in
PreregistrationUser and MultiuseInvite objects. This field will
be used to subscribe the new users to the default streams at the
time of account creation and not to the streams that were default
when sending the invite.
This commit changes the code to subscribe the invited user to default
streams even if the user who invited the new user was not allowed to
subscribe others to streams.
This commit adds support to pass object containing both old and new
values of the can_mention_group setting, as well as detailed API
documentation for this part of the API system.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
Co-authored-by: Greg PRice <greg@zulip.com>
This commit adds API documentation for "/users/me/android_gcm_reg_id:post"
and "/users/me/android_gcm_reg_id:delete" endpoints.
Co-authored-by: Suyash Vardhan Mathur <suyash.mathur@research.iiit.ac.in>
This commit adds API documentation for "/users/me/apns_device_token:post"
and "/users/me/apns_device_token:delete" endpoints.
openapi: Document android_gcm_reg_id endpoints.
Co-authored-by: Suyash Vardhan Mathur <suyash.mathur@research.iiit.ac.in>
We no longer create the 'core team' private channel when
a realm is created.
Earlier, "New user announcements" channel was set to the
"core team" channel. Now it is disabled by default.
populate_db still creates the 'core team' channel to
represent a private channel.
The naming `uri` is deprecated while `url` should be used in order to
satisfy URL standards. For this reason, four endpoints are affected:
* The response content of three endpoints `/server_settings`,
`/register` and `/realm` that contain a field `realm_uri` is
changed to `realm_url`.
* In one of the common fields for all mobile push notifications payloads,
`realm_url` field is now added as an alias to `realm_uri`.
For backwards compatibility, we keep the field `realm_uri` and add
an alias `realm_url`.
Co-authored-by: Junyao Chen <junyao.chen@socitydao.org>
In #23380, we are changing all occurrences of uri with url in order to
follow the latest URL standard. Previous PRs #25038 and #25045 has
replaced the occurences of uri that has no direct relation with realm.
This commit changes just the model property, which has no API
compatibility concerns.
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.
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).
This commit removes name, description, is_system_group and
can_mention_group fields from UserGroup model and rename
them in NamedUserGroup model.
Fixes#29554.
Updates various areas of the backend code that generate
JsonableErrors with translated strings to use channel
instead of stream.
Part of stream to channel rename project.
In zerver/lib/exceptions.py, updates translated error strings
to use channel instead of stream.
Note that the STREAM_WILDCARD_MENTION_NOT_ALLOWED and the
STREAM_DOES_NOT_EXIST error codes, and any additional fields
included with those errors, are not changed in these updates.
Part of stream to channel rename project.
Updates translated JsonableError strings that relate to streams
to use channel instead of stream. Separated from other error string
updates as this is a dense area of changes for this rename.
Part of stream to channel rename project.
Updates the API changelog entry and changes notes for feature level
249 to match other API updates to narrow filters, and links to the
help center article on emoji reactions in these notes.
Feature level 249 changes were originally in commit c3408b56f0.
Updates the API changelog entries and changes notes for feature
levels 233 and 230, which both are related to the onboarding
steps (hotspots and one-time notices) updates.
Feature level 233 was originally documented in commit 83bd9955e3
and ac8af3d6de.
Feature level 230 was originally documented in commit 8d633cc36.
Updates the changelog entry to use "ID" instead of "id".
Revises text for "null" value to match other field descriptions
in these stream/subscription objects.
Adds nullable creator field, containing a reference to the user who
created the stream. When creating a stream, acting user is set as
the creator of the stream. Since API calls to create streams always
have an acting user, this field should always be set when streams
are created using the API.
Because streams can be created with no acting user, this field is
nullable. We try to backfill existing streams using RealmAuditLog table,
but not all streams are guaranteed to have a recorded create log. Thus
this new field is left null when it cannot be backfilled. We also set
this field to null when the creator user is deleted.
In 5e30ab91b9, we introduced
'stream_id' parameter. 'to' is no longer used when composing
stream messages to specify the stream ID.
Earlier, 'to' parameter accepted a single element list
containing the ID of the stream.
Since we can't specify multiple stream IDs anymore, the
example JSON error response documented is stale.
This commit updates that.
This commit adds an option to the advanced section of
Preferences settings, that would allow users to choose
whether to receive typing notifications from other
users.
Fixes#29642
Documents the addition of "channel" and "channels" as operators for
search/narrow filters, noting that they are aliases of the "stream"
and "streams" operators.
This change does not yet deprecate the "stream" and "streams"
operators.
Part of stream to channel rename project.
For endpoints with a type parameter to indicate whether a message is
a direct or stream message, adds support for passing "channel" as a
value for stream messages.
Part of stream to channel rename project.
Adds "/invites/multiuse" endpoint to the API documentation.
Creates a shared schema for the invite_as and invite_expires_in_minutes
parameters that are the same for the "POST /invites" endpoint.
Also, updates the response documented for the "GET /invites" endpoint
to match the information in the "POST /invites" and "/invites/multiuse"
documentation.
Previously, users were allowed to signup or change their names to
those which already existed in the realm.
This commit adds an Organization Permission, that shall enforce
users to use unique names while signing up or changing their
names. If a same or normalized full name is found in realm,
then a validation error is thrown.
Fixes#7830.
Links to the available message flag table in the feature level 224
changelog entry, as there are relevant **Changes** notes for this
feature level in that part of the API documentation.
Updates the order and formatting of these new and deprecated flags
in the available flags table. Also, adds a link to the topic
wildcard mentions section of the help center documentation.
Makes small clean ups to the changes notes for this feature level,
as well as the changelog entry itself.
The original commit for these feature level 224 API changes was
c597de6a1d.
Only affects zulipchat, by being based on the BILLING_ENABLED setting.
The restricted backends in this commit are
- AzureAD - restricted to Standard plan
- SAML - restricted to Plus plan, although it was already practically
restricted due to requiring server-side configuration to be done by us
This restriction is placed upon **enabling** a backend - so
organizations that already have a backend enabled, will continue to be
able to use it. This allows us to make exceptions and enable a backend
for an org manually via the shell, and to grandfather organizations into
keeping the backend they have been relying on.
This commit adds a realm-level setting named
'zulip_update_announcements_stream' that configures the
stream to which zulip updates should be posted.
Fixes part of #28604.
This commit renames the realm-level setting
'signup_notifications_stream' to 'signup_announcements_stream'.
The new name reflects better what the setting does.
This commit renames the realm-level setting 'notifications_stream'
to 'new_stream_announcements_stream'.
The new name reflects better what the setting does.
Commit bd6471f0e3 (#28691) added this
reference to the old name, even though it had already been renamed in
commit b220d29fed (#17775), presumably
because that had failed to update the OpenAPI description.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This error message didn’t make sense for the check as written, and our
OpenAPI document already provides the expected format for our 200
responses.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Real requests would not validate against the previous version. There
seems to be no consistent way to determine whether a string parameter
should be coerced to an integer for validation against an allOf
schema (which works at the level of JSON objects, not strings).
See also https://github.com/python-openapi/openapi-core/issues/698.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Extends the description of the authentication_methods realm setting
in the /api/get-events and /api/register-queue endpoints to clarify
the recommended use of the object is for implementing server settings
UI, and to note the data returned by the /api/server-settings
endpoint should be used for implementing authentication UI.