mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +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:
@@ -163,7 +163,7 @@ run_test('snapshot_message', () => {
|
||||
global.compose_state.message_content = function () {
|
||||
return draft.content;
|
||||
};
|
||||
global.compose_state.recipient = function () {
|
||||
global.compose_state.private_message_recipient = function () {
|
||||
return draft.private_message_recipient;
|
||||
};
|
||||
global.compose_state.stream_name = function () {
|
||||
|
||||
Reference in New Issue
Block a user