mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
stream_settings: Add new "Stream details" section in General tab.
We want to make it easier to find stream details such as creator, creation date and stream id. The commit replaces the "Email address" section in General tab of stream overlay with a new section called "Stream details", "Email address" is now a field in this section. If the stream does not have a creator, we only show the stream creation date in creation details. Fixes: #25648.
This commit is contained in:
@@ -3,6 +3,7 @@ import * as color_data from "./color_data";
|
||||
import {FoldDict} from "./fold_dict";
|
||||
import {page_params} from "./page_params";
|
||||
import * as peer_data from "./peer_data";
|
||||
import type {User} from "./people";
|
||||
import * as people from "./people";
|
||||
import * as settings_config from "./settings_config";
|
||||
import * as settings_data from "./settings_data";
|
||||
@@ -186,6 +187,14 @@ export function get_sub_by_id(stream_id: number): StreamSubscription | undefined
|
||||
return stream_info.get(stream_id);
|
||||
}
|
||||
|
||||
export function maybe_get_creator_details(creator_id: number | null): User | undefined {
|
||||
if (creator_id === null) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return people.get_user_by_id_assert_valid(creator_id);
|
||||
}
|
||||
|
||||
export function get_stream_id(name: string): number | undefined {
|
||||
// Note: Only use this function for situations where
|
||||
// you are comfortable with a user dealing with an
|
||||
|
||||
Reference in New Issue
Block a user