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: Remove unnecessary pm_recipient being set.

Aman Agrawal2c4156e23953
diff --git a/web/src/compose_reply.js b/web/src/compose_reply.js
index 4b0e4313e53..c94fe94d1b3 100644
--- a/web/src/compose_reply.js
+++ b/web/src/compose_reply.js
@@ -97,16 +97,13 @@ export function respond_to_message(opts) {
if (msg_type === "stream") {
stream_id = message.stream_id;
topic = message.topic;
+ } else if (opts.reply_type === "personal") {
+ // reply_to for direct messages is everyone involved, so for
+ // personals replies we need to set the direct message
+ // recipient to just the sender
+ pm_recipient = people.get_by_user_id(message.sender_id).email;
} else {
- pm_recipient = message.reply_to;
- if (opts.reply_type === "personal") {
- // reply_to for direct messages is everyone involved, so for
- // personals replies we need to set the direct message
- // recipient to just the sender
- pm_recipient = people.get_by_user_id(message.sender_id).email;
- } else {
- pm_recipient = people.pm_reply_to(message);
- }
+ pm_recipient = people.pm_reply_to(message);
}
compose_actions.start(msg_type, {