Commit Graph

26 Commits

Author SHA1 Message Date
Kislay Verma
67ca49488f tests: Use make_realm to create type-correct realm objects.
Another step in the direction of improving node tests
and using type-correct organic data as much as possible.
2025-08-28 11:35:07 -07:00
Vector73
6c94266bf9 stream_data: Rename is_stream_archived function.
Renames `is_stream_archived` function to `is_stream_archived_by_id`.
2025-08-05 13:41:08 -07:00
opmkumar
8786b12f0c streams: Add can_resolve_topics_group setting.
Fixes #19955.
2025-07-08 16:53:43 -07:00
Vector73
6094bbe8a5 stream_settings: Add new topics_policy setting.
Added `topics_policy` channel setting to configure sending
messages in the empty topic.

Fixes #33549.
2025-06-17 17:05:58 -07:00
Sahil Batra
7c01e61e5a streams: Add UI to add or remove stream from a folder.
This commit adds UI to add a stream to a folder while
creating them and also for adding/removing an existing
stream from a folder.
2025-06-10 11:51:58 -07:00
Tim Abbott
bbeede1e52 people: Optimize is_person_active.
Calling settings_data.user_can_access_all_other_users on every call to
this function could be expensive when using this function in loops
over every user in the organization.

After the previous commit, those calls are still somewhat expensive
for guest users.
2025-06-06 10:53:03 -07:00
whilstsomebody
2780360b00 unarchive: Add support for unarchiving archived channels.
This commit adds support for unarchiving archived channels
by introducing the `is_archived` parameter to the
`PATCH /streams/{stream_id}` API endpoint. Sending a PATCH
request with `is_archived: false` will unarchive the specified
channel.
2025-05-16 11:39:40 -07:00
Aman Agrawal
1ace8b80f5 hash_util: Set channel URL based on user setting.
We now render channel feed URL or channel topics list URL in
all elements based on user setting.
2025-05-09 15:13:56 -07:00
Sahil Batra
1af039d87b stream-settings: Fix live update of subscribers UI.
Changes done here are -

- Previously the pill input, "Add" button and tooltip shown
when user did not have permission were not live updated when
updating can_add_subscribers_group and can_subscribe_group
stream level settings or can_add_subscribers_group realm
level setting. This commit fixes that.

- Also, when the UI was live updated to give user permission
to subscribe others, "Add" button was enabled even when
input was empty. This is also fixed in this commit.
2025-05-02 16:23:52 -07:00
Sahil Batra
4f80823191 settings: Fix opening settings for guests who cannot access all users.
Opening settings and stream settings UI was not working for guests
if they could not access all users. This was because is_person_active
did not handle inaccessible users correctly, if they were not added in
the users data, when being called in get_group_members to render
group pills.
2025-04-14 11:44:11 -07:00
Sahil Batra
9d15a11331 streams: Live update UI correctly when archiving streams.
Previously, "delete" event was sent for both archiving streams
and when user lost access to a stream. So, when user lost
access to a stream, the UI was live updated like the stream
was archived, which was not correct. But now "update" event
is sent when a stream is archived, so the webapp code is
changed accordingly to live-update the UI for both cases
correctly.

As a result, some of the changes in 43932cd6aa and a29b6485d6
are reverted as "update" event is sent when archiving and "delete"
event is sent only when a user loses access to a stream as before.
2025-04-08 12:41:09 -07:00
Sahil Batra
166d9282b8 streams: Use can_subscribe_group setting for checking permission.
This commit adds code to use can_subscribe_group setting in webapp.

Fixes part of #33417.
2025-02-25 13:17:15 -08:00
Sahil Batra
fbbd36b306 group-settings: Live update permissions panel.
This commit adds code to live update permissions panel when
a group gains permission.
2025-02-04 16:08:58 -08:00
Sahil Batra
071037c55d settings: Show assigned stream permissions in group permissions panel. 2025-01-27 15:32:15 -08:00
Sahil Batra
a5e5a010fe stream-events: Handle update events for deprecated properties.
We just do nothing and avoid any warnings for update events
received for "stream_post_policy" and "is_announcement_only"
properties.
2025-01-07 12:17:37 -08:00
Sahil Batra
1175467d45 stream-settings: Remove code related to stream post policy. 2025-01-07 12:17:37 -08:00
Anders Kaseorg
b19a556982 stream_types: Remove email_address from ApiStreamSubscription.
Commit 432001656e removed this from the
backend.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-30 09:42:26 -08:00
Shubham Padia
173c09e32b stream_events: Loop over stream group settings for update_property. 2024-12-04 12:26:16 -08:00
Shubham Padia
7e92c2ad16 streams: Use can_administer_channel_group to administer channel.
Fixes #31959.
2024-12-03 18:38:25 -08:00
Shubham Padia
dbf9f2d181 stream: Use generic update_stream_permission_group_setting.
We will not have to create a new function for every setting that we add
in the future.
2024-12-01 19:32:22 -08:00
Aman Agrawal
1aee0ef98b stream: Use is_recently_active to check active status. 2024-11-27 17:31:06 -08:00
evykassirer
8fff2fcd3c stream_events: Assume mark_unsusbscribed sub is defined.
THere's only one call to this function, which should have
a defined `sub`, so we can enforce this through typescript
instead of doing an `undefined` check.
2024-11-26 09:18:12 -08:00
evykassirer
12c18a026b stream_events: Remove error for undefined sub, enforce through typescript. 2024-11-26 09:18:12 -08:00
evykassirer
64c8884487 stream_events: Convert module to typescript. 2024-11-26 09:18:12 -08:00
Sahil Batra
5d1de4c037 stream-settings: Use new pills UI for can_remove_subscribers_group. 2024-11-16 17:11:08 -08:00
Anders Kaseorg
687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00