Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose_reply: Extract type for quote_message options.

apoorvapendsea8acb05f9ef4
diff --git a/web/src/compose_reply.ts b/web/src/compose_reply.ts
index 53541fd13d1..1924b4a79c5 100644
--- a/web/src/compose_reply.ts
+++ b/web/src/compose_reply.ts
@@ -27,6 +27,15 @@ import * as sub_store from "./sub_store.ts";
import * as topic_link_util from "./topic_link_util.ts";
import * as unread_ops from "./unread_ops.ts";
+type QuoteMessageOpts = {
+ message_id?: number;
+ quote_content?: string | undefined;
+ keep_composebox_empty?: boolean;
+ reply_type?: "personal";
+ trigger?: string;
+ forward_message?: boolean;
+};
+
export let respond_to_message = (opts: {
keep_composebox_empty?: boolean;
message_id?: number;
@@ -241,14 +250,7 @@ function get_quote_target(opts: {message_id?: number; quote_content?: string | u
return {message_id, message, quote_content};
}
-export function quote_message(opts: {
- message_id?: number;
- quote_content?: string | undefined;
- keep_composebox_empty?: boolean;
- reply_type?: "personal";
- trigger?: string;
- forward_message?: boolean;
-}): void {
+export function quote_message(opts: QuoteMessageOpts): void {
const {message_id, message, quote_content} = get_quote_target(opts);
const quoting_placeholder = $t({defaultMessage: "[Quoting…]"});