Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stream_types: Remove email_address from ApiStreamSubscription.
Anders Kaseorgb19a556982ec
diff --git a/web/src/server_events_dispatch.js b/web/src/server_events_dispatch.jsindex 96e4579cb49..47799bfa7b3 100644--- a/web/src/server_events_dispatch.js+++ b/web/src/server_events_dispatch.js@@ -664,7 +664,6 @@ export function dispatch_normal_event(event) {for (const rec of event.subscriptions) {const sub = sub_store.get(rec.stream_id);if (sub) {- stream_data.update_stream_email_address(sub, rec.email_address);stream_events.mark_subscribed(sub, rec.subscribers, rec.color);} else {blueslip.error("Subscribing to unknown stream", {diff --git a/web/src/stream_data.ts b/web/src/stream_data.tsindex b4e06b68d58..f48fd66e4f8 100644--- a/web/src/stream_data.ts+++ b/web/src/stream_data.ts@@ -393,10 +393,6 @@ export function get_colors(): string[] {return subscribed_subs().map((sub) => sub.color);}-export function update_stream_email_address(sub: StreamSubscription, email: string): void {- sub.email_address = email;-}-export function update_stream_post_policy(sub: StreamSubscription,stream_post_policy: StreamPostPolicy,diff --git a/web/src/stream_edit.ts b/web/src/stream_edit.tsindex 56eadc8397a..f22ff9af386 100644--- a/web/src/stream_edit.ts+++ b/web/src/stream_edit.ts@@ -142,9 +142,6 @@ export function open_edit_panel_empty(): void {export function update_stream_name(sub: StreamSubscription, new_name: string): void {const $edit_container = stream_settings_containers.get_edit_container(sub);- if (sub.email_address !== undefined) {- $edit_container.find(".email-address").text(sub.email_address);- }$edit_container.find(".sub-stream-name").text(new_name);const active_data = stream_settings_components.get_active_data();diff --git a/web/src/stream_events.ts b/web/src/stream_events.tsindex 9bf96e5e713..561fc989eab 100644--- a/web/src/stream_events.ts+++ b/web/src/stream_events.ts@@ -136,9 +136,6 @@ export function update_property<P extends keyof UpdatableStreamProperties>(other_values.rendered_description,);},- email_address(value) {- sub.email_address = value;- },pin_to_top(value) {update_stream_setting(sub, value, "pin_to_top");stream_list.refresh_pinned_or_unpinned_stream(sub);diff --git a/web/src/stream_types.ts b/web/src/stream_types.tsindex af33b39b997..9f1e58939ef 100644--- a/web/src/stream_types.ts+++ b/web/src/stream_types.ts@@ -62,7 +62,6 @@ export const stream_properties_schema = stream_specific_notification_settings_sc// This is the raw data we get from the server for a subscription.export const api_stream_subscription_schema = stream_schema.merge(stream_properties_schema).extend({- email_address: z.string().optional(),stream_weekly_traffic: z.number().nullable(),subscribers: z.array(z.number()).optional(),});diff --git a/web/tests/peer_data.test.cjs b/web/tests/peer_data.test.cjsindex 37969914a5a..154ec182478 100644--- a/web/tests/peer_data.test.cjs+++ b/web/tests/peer_data.test.cjs@@ -142,9 +142,6 @@ test("subscribers", () => {peer_data.add_subscriber(stream_id, brutus.user_id);assert.ok(stream_data.is_user_subscribed(stream_id, brutus.user_id));assert.equal(peer_data.get_subscriber_count(stream_id), 1);- const sub_email = "Rome:[email protected]:9991";- stream_data.update_stream_email_address(sub, sub_email);- assert.equal(sub.email_address, sub_email);// verify that adding an already-added subscriber is a nooppeer_data.add_subscriber(stream_id, brutus.user_id);diff --git a/web/tests/stream_events.test.cjs b/web/tests/stream_events.test.cjsindex 8e561661b2d..70ae061df4e 100644--- a/web/tests/stream_events.test.cjs+++ b/web/tests/stream_events.test.cjs@@ -215,10 +215,6 @@ test("update_property", ({override}) => {assert.equal(args.val, "we write code");}- // Test email address change- stream_events.update_property(stream_id, "email_address", "[email protected]");- assert.equal(sub.email_address, "[email protected]");-// Test pin to top{override(stream_list, "refresh_pinned_or_unpinned_stream", noop);