Commit Graph

15 Commits

Author SHA1 Message Date
Anders Kaseorg b9e62c7af8 page_params: Split out state data for realm.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a second step, split
out the subset of fields that pertain to the entire realm.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg e96ede0ef6 page_params: Split out state data for current user.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a first step, split
out the subset of fields that pertain to the current user.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Evy Kassirer 6e902defba
node tests: Use noop helper function pattern in test files.
Some files already were using `noop` in place of `() => {}`.
It's both clearer what it means and is easier to type.
This updates all test files to fully use `noop`, and
adds a shared import from the test lib file.
2023-12-14 14:51:33 -08:00
Karl Stolley 9f00b513f7 compose_box: Improve structures around compose buttons. 2023-11-13 12:45:13 -08:00
Anders Kaseorg d6be353299 compose_state: Make get_or_set accept a full selector.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-02 14:06:04 -07:00
Karl Stolley 383466eaff compose_box: Change 'audio' references to 'voice'. 2023-10-18 14:04:00 -07:00
Anders Kaseorg e8a2a5ce36 compose: Move initialize to new compose_setup module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 14:42:19 -07:00
Anders Kaseorg fb19476c4e compose: Move uppy to upload module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 14:50:02 -07:00
Hemant Umre f731602024 org_settings: Add frontend support for `realm_jitsi_server_url`.
This commit adds a dropdown and custom input element to set the
`realm_jitsi_server_url` when the video call provider is Jitsi. This
allows organization administrators to add a custom Jitsi server as the
organization's video call provider.

Fixes #17914.

Co-authored-by: Gaurav Pandey <gauravguitarrocks@gmail.com>
2023-09-21 17:39:10 -07:00
Danny Su 66b9c06de6 compose: Add support for Zoom audio call
This PR implements the audio call feature for Zoom. This is done by explicitly
telling Zoom to create a meeting where the host's video and participants' video
are off by default.

Another key change is that when creating a video call, the host's and
participants' video will be on by default. The old code doesn't specify that
setting, so meetings actually start with video being off. This new behavior has
less work for users to do. They don't have to turn on video when joining a call
advertised as "video call". It still respects users' preferences because they
can still configure their own personal setting that overrides the meeting
defaults.

The Zoom API documentation can be found at
https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetingCreate

Fixes #26549.
2023-08-28 18:32:20 -07:00
Satyam Bansal cc8c159e0a compose: Add support for Jitsi audio calls.
Fixes #12207.
2023-08-24 10:52:34 -07:00
Satyam Bansal 4c501e4321 compose: Extract video call link creation logic to a generic function.
This extraction has been done to make sure that creation of audio call
links can happen in the same function only.

A change in test was also required as the whole logic of finding the
textarea where the link should be inserted happens a bit later now.
2023-08-24 10:52:34 -07:00
Anders Kaseorg 63c9296d53 tests: Fix direct mutation of ES modules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-08-04 18:00:38 -07:00
N-Shar-ma 3a64c8c0db compose: Change video call url text to "Join video call.".
Earlier it was "Click here to join video call".
2023-04-20 15:04:26 -07:00
Anders Kaseorg cea1119423 node_tests: Move to web/tests.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00