This commit simplifies a compose_validate test by
using FakeComposeBox.
It also exposes $send_message_form to the callers.
(The general idea here is that for any individual
test, we don't want the developer to have to
switch between thinking about low-level zjquery
idioms and higher-level abstractions.)
This commit also removes the use of mock_template,
since the template in question generates trivially
easy html to deal with (and we verify the actual
effects to the DOM).
Within FakeComposeBox I **mostly** want to keep the code
concrete (using explicit selectors), but these two
concepts are an exception to that rule:
content textarea
preview message area
In particular, for the DOM element that is the textarea
where you compose your message in markdown (i.e. the
main edit area), the real code has different ways of
expressing that in jQuery.
Since the content area is a singleton on the entire page,
a lot of code sensibly does an id search for the element.
There are some other pieces of code that do another
sensible thing, which is to search for the DOM element
within the container by the class name of .message-textarea.
This aliasing may cause some headaches down the road
for testing, but this commit should make it a little
easier to work around that in the future.
For now compose_helpers only includes FakeComposeBox.
I don't love either of the names, but some of the alternatives
that I thought of have their own tradeoffs.
The compose_helpers module will soon have other
helper classes or functions in it, possibly including
the mock_banners helper from lib/compose_banner.
I don't want to step on mock_banners yet, because
I have two possible plans for improving that code,
and I haven't decided what's best yet, so for now
I don't want to step on it or move it, so I am
just leaving that alone for now.
Gotta start somewhere.
We now allow users to create voice calls when their call provider is
BigBlueButton. This is done by creating a call where cameras are
disabled for all participants in the call -- a voice call, and making
only the call creator the moderator, so no one else can switch a voice
only call to a video call.
Also, we stop using the deprecated fields "attendeePW" and "moderatorPW"
in the Big Blue Button API, and use "role" instead.
The side effects are that now we only support BigBlueButton 2.4 and
above, and that only the call creator is a moderator and all other
joinees are viewers for all BigBlueButton calls.
Fixes: #26550.
Most of the code for the integration was written by Nehal.
Apoorva made the changes that resolve conflicts which were
introduced because of the `typed_endpoint` decorator.
With some documentation tweaks by tabbott.
Co-authored-by: Apoorva Pendse <apoorvavpendse@gmail.com>
Previously, the read-receipts dialog did not update if
someone viewed the focused message while the dialog
box was open. Users had to close and reopen it to see
the updated receipts. Now, the dialog refreshes every
minute to keep the read-receipts updated while open.
Fixes: #24716.
The NOT EXISTS structure might be better optimized by the Postgres query
planner and might lead to slightly better performance than the id NOT IN
(<subquery>) structure.
This can happen if `post_render` is called to show loading indicator
before the submit button is rendered. This results in the submit
button having no width / height dimensions.
Fixed by ensuring post_render is called post render.
This commit sets the default for user_list_style to
USER_LIST_STYLE_WITH_AVATAR so that the organization
level defaults for new users of this setting is set
to show avatar in right sidebar for new orgs.
`data-video-original-url` is duplicative with the `href` on the
surrounding `a` tag, which is never run through the Camo URL
translation. The `data-video-original-url` attribute was never
documented, and is not used by either mobile project, so is simply
removed.
The `.url` and `.source` fields were being inconsistently used. This
also makes `.source` field consistently into a URL when it is
generated, instead of being re-interpreted in `display_video` for some
formats.
If the content-type of the image is not in INLINE_MIME_TYPES, then we
do not expect browsers to be able to display it. This behaviour is
particularly confusing because the thumbnail will render properly,
since that will be in the more widely-supported WebP format, but the
lightbox will show a broken image.
In these cases, generate a high-resolution (4032x3024) "thumbnail"
which clients can choose to use instead. This thumbnail format is not
in the listed in the server's advertised thumbnail size list, because
it is not reliably generated for every image.
The transcoded thumbnail format is set on the `img` tag if it is
generated, and the original content-type is always passed to the
client, so it can decide how or if to render the original image. This
content-type is as the _original uploader_ specified it, so may be
incorrect.
The transcoded image is not animated, even if the original was. HEIC
files can nominally be animated, but in testing libvips was not able
to correctly recognize them as such. TIFF files are parsed as being
"animated," with one page per frame; this is of dubious utility, so
we merely transcode the first page. Always generating a static
transcoded image serves to also limit the computational time spent.
THUMBNAIL_OUTPUT_FORMATS is switched to be a tuple to ensure that it
is not accidentally mutated.
This commit updates the code to show the display name for system groups
instead of their original names which contain "role:" prefix in
membership status text.
This commit updates the code to show the display name for system
groups instead of their original names which contain "role:"
prefix in the members list shown in group edit and creation UI.
Fixes#31926.
The tus-js-client fingerprinting feature stores metadata on
previously uploaded files by default in browser local storage.
Since these local storage entries are never garbage-collected,
they can be accessed via the browser console even after
logging out, and contain some metadata about previously
uploaded files, which seems like a security risk for
using Zulip on a public computer.
We use our own implementation of url storage that saves urls
in memory instead. We won't be able to retain this history
across reloads unlike local storage, which is a tradeoff we
are willing to make.
This commit adds a `sender_id` parameter to the
`GET /streams/{stream_id}/email_address` endpoint to specify the
ID of a user or bot which should appear as the sender when messages
are sent to a channel using the channel email address.
Earlier, Email gateway bot was always the sender.
Fixes part of #31566.
This commit extracts the logic for creating or retrieving a channel
email token into a dedicated `get_channel_email_token` function.
This improves code clarity by decoupling token generation from
the email encoding process.
In Slack webhook integration setup, the only scenario where a message
payload contains a channel mention without the channels name is when the
user mentions a private channel.
e.g <#C07AVLQ3AUQ|>
This commit updates the string we use for such mention to "private Slack
channel" for better clarity.
Previously, the notification message only informed users that the
integration URL was registered with Slack's Event API. However, it might
be misleading to send an "integration is successful" message when this
happens because we didn't verify that the token has the required scopes
or if the Slack token is even added to the URL at all.
Now that the integration also verifies the `slack_app_token`'s scope,
it's now more appropriate to send a notification message like
`get_setup_webhook_message` to let the user know that the setup is
indeed successful.
- Replaces the magnifying glass icon with a new design that
aligns better with the purpose of finding channels.
- Matches the "Browse Channels" link styling with the link at
the bottom of the left sidebar for consistency
Fixes: #32914
Co-Authored-By: Vlad Korobov <terpimost@gmail.com>
Added colors to notify users when the message length is near
the limit or has exceeded it. Used distinct colors for each
case to provide clear feedback.
Fixes: #32171.
This commit ensures that if the color picker popover is opened via the
stream actions popover, we hide the stream actions popover and instead
show the color picker popover in its place, anchoring to the same
reference element.
This avoids the cluttering of the view with multiple layers of UI,
given that it is also possible to open the browser native color picker
from the color picker popover.
As a follow-up to the previous commit which replaces the spectrum color
picker instances with the custom color picker popover, this commit
removes the spectrum-colorpicker library and its related code from the
codebase.
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 adds support for empty topic name for
'/messages/matches_narrow' endpoint.
Makes sure that using this endpoint in old clients
with topic name having the value of `realm_empty_topic_display_name`
field in `narrow` parameter works as expected.
This adds support for empty topic name for
'/messages/flags/narrow' endpoint.
Makes sure that using this endpoint in old clients
with topic name having the value of `realm_empty_topic_display_name`
field in `narrow` parameter works as expected.
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 backward compatibility for topic names in `user_topics`
objects returned in `/register` response.