mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
compose_state: Rename compost_state.recipient to be about PMs only.
The compose_state.recipient field was only actually the recipient for the message if it was a private_message_recipient (in the sense of other code); we store the stream in compose_state.stream instead. As a result, the name was quite confusing, resulting in the possibility of problematic correctness bugs where code assumes this field has a valid value for stream messages. Fix this by changing it to compose_state.private_message_recipient for clarity.
This commit is contained in:
@@ -41,7 +41,7 @@ exports.topic = get_or_set('stream_message_recipient_topic');
|
||||
// We can't trim leading whitespace in `compose_textarea` because
|
||||
// of the indented syntax for multi-line code blocks.
|
||||
exports.message_content = get_or_set('compose-textarea', true);
|
||||
exports.recipient = function (value) {
|
||||
exports.private_message_recipient = function (value) {
|
||||
if (typeof value === "string") {
|
||||
compose_pm_pill.set_from_emails(value);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user