mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
When fading tests for matching messages, normalize huddle lists
(imported from commit 805e62c1a57e754c225b743c7d801d8b33da5ed4)
This commit is contained in:
@@ -193,6 +193,13 @@ exports.same_sender = function util_same_sender(a, b) {
|
||||
(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
|
||||
// one by one until the decode succeeds. This makes sense if
|
||||
// we are decoding input that the user is in the middle of
|
||||
|
||||
Reference in New Issue
Block a user