Fixes#33156.
If the stream is set to on the private settings for privacy, we add a
parenthesis text `must be subscribed`.
We had to use JS to change the string since just having a conditional in
the handlebars template would not ensure that the parenthesis text
appears or disappears on changing the value.
This commit replaces the spectrum color picker used in the stream
popover and stream settings with a custom color picker popover, which
contains a grid of predefined color swatches and a custom color option.
The custom color option uses the HTML5 <input type="color"> which shows
the native browser color picker UI.
Fixes#14961.
This commit is a part of the work to support empty string
as a topic name.
Previously, empty string was not a valid topic name.
Adds `allow_empty_topic_name` boolean parameter to `GET /messages`
and `GET /messages/{message_id}` endpoints to decide whether the
topic names in the fetched messages can be empty strings.
If False, the topic names in the fetched message will have the
value of `realm_empty_topic_display_name` field in `POST /register`
response replacing "" for channel messages.
This commit is a part of the work to support empty string
as a topic name.
Previously, empty string was not a valid topic name.
Adds a `empty_topic_name` client capability to allow client
to specify whether it supports empty string as a topic name.
Adds backward compatibility for:
- `subject` field in the `message` event type
Earlier, when a topic was deleted then UserTopic rows corresponding
to that topic were not deleted resulting in a bug where the topic
is listed in the '/#settings/topics' panel even after deletion.
This commit fixes the incorrect behavior to delete the concerned
UserTopic rows.
We need to take special care of the case when a topic is deleted
in private channel with protected history. We delete the UserTopic
records for exactly the users for whom after the topic deletion
action, they no longer have access to any messages in the topic.
This commit completely eliminates the home-grown
data_types.py system for checking types.
Now, in our unit tests and schema checkers, we use
pydantic types to check the shape of the event
objects that are either in our JSON fixtures or
that get captured by test_events.py.
The code in event_types.py was completely
code-generated from the legacy version of
event_schema.py, so there shouldn't be any
manual errors in how I ported the types over.
(The code generation was non-trivial, though,
as I had to account for changes from
snake_case to CamelCase and deal with some
other anomalies.)
When we move away from `data_types.py` in favor of using
`pydantic` to describe the shape of our event objects in
the events test (hopefully coming soon), then the code
I deleted here will no longer work.
The consequence of this change is that API docs may
diverge from the actual event types that we use, but
I believe there are better ways to manage this.
Also, the deleted code was particularly hard to debug
(and I say that as the original author). It probably
also causes friction for folks who want to update the
docs but who don't necessarily grok how the event tests
work under the legacy `data_types.py` regime.
Once we get pydantic types working, we can probably
just write a separate tool to validate against them
against the API docs using the `openapi-schema-pydantic`
package or something similar.
This commit conditionally adds the source command for
virtualenv in the user's bash profile only when the
system is virtualized.
Checking WSL_DISTRO_NAME in the env vars
is the cheapest option in case of checking
whether the system runs as WSL VM since
it is an in memory operation.
Hence it is checked for first in `is_wsl_instace`.
Fixes#15029.
Made the input field of the page consistent with
the other similar pages. Here are I have done the following things:
1. Changed text 'Enter your organization's Zulip URL:'->'Organization URL'.
2. Left aligned the label and button to make it consistent.
3. Moved 'Don't know your organization URL? Find your organization.' to be
just below the URL field.
4. Changed the placeholder 'your-organization-url' -> 'your-organization'
Fixes#32198
Removes deprecated `user` object from reactions objects returned by
the API as it is redundant because of the presence of `user_id` field in
the API and is not used by any clients now.
Add a common function for webhooks to convert multipart strings to dict.
This facilitates loading a multipart/form-data fixture as a file string,
and converting it.
This will allow testing integrations that use multipart/form-data,
and generating their example screenshots using a script.
Note that this only supports text fields, accommodation for binary files
is not included at the moment.