mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
stream_types: Remove email_address from ApiStreamSubscription.
Commit 432001656e removed this from the
backend.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
536938eea6
commit
b19a556982
@@ -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", {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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(),
|
||||
});
|
||||
|
||||
@@ -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:214125235@zulipdev.com: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 noop
|
||||
peer_data.add_subscriber(stream_id, brutus.user_id);
|
||||
|
||||
@@ -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", "zooly@zulip.com");
|
||||
assert.equal(sub.email_address, "zooly@zulip.com");
|
||||
|
||||
// Test pin to top
|
||||
{
|
||||
override(stream_list, "refresh_pinned_or_unpinned_stream", noop);
|
||||
|
||||
Reference in New Issue
Block a user