mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
When fading tests for matching messages, normalize huddle lists
(imported from commit 805e62c1a57e754c225b743c7d801d8b33da5ed4)
This commit is contained in:
@@ -157,7 +157,7 @@ function update_fade () {
|
|||||||
faded_to.stream = $('#stream').val();
|
faded_to.stream = $('#stream').val();
|
||||||
faded_to.subject = $('#subject').val();
|
faded_to.subject = $('#subject').val();
|
||||||
} else {
|
} else {
|
||||||
faded_to.reply_to = $('#private_message_recipient').val();
|
faded_to.reply_to = util.normalize_recipients($('#private_message_recipient').val());
|
||||||
}
|
}
|
||||||
|
|
||||||
compose.update_faded_messages();
|
compose.update_faded_messages();
|
||||||
|
|||||||
@@ -193,6 +193,13 @@ exports.same_sender = function util_same_sender(a, b) {
|
|||||||
(a.sender_email === b.sender_email));
|
(a.sender_email === b.sender_email));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.normalize_recipients = function (recipients) {
|
||||||
|
recipients = $.map(recipients.split(','), $.trim);
|
||||||
|
recipients = $.grep(recipients, function (s) { return s.length>0; });
|
||||||
|
recipients.sort();
|
||||||
|
return recipients.join(',');
|
||||||
|
};
|
||||||
|
|
||||||
// Avoid URI decode errors by removing characters from the end
|
// Avoid URI decode errors by removing characters from the end
|
||||||
// one by one until the decode succeeds. This makes sense if
|
// one by one until the decode succeeds. This makes sense if
|
||||||
// we are decoding input that the user is in the middle of
|
// we are decoding input that the user is in the middle of
|
||||||
|
|||||||
Reference in New Issue
Block a user