mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
echo: Fix local echo sending a message to "yourself, ".
Previously, this would incorrectly include a user with name and email "" in the recipients list shown in the local echo code path. We fix this and add a test for the issue.
This commit is contained in:
@@ -70,7 +70,9 @@ exports.is_pm_recipient = function (email, message) {
|
||||
};
|
||||
|
||||
exports.extract_pm_recipients = function (recipients) {
|
||||
return recipients.split(/\s*[,;]\s*/);
|
||||
return _.filter(recipients.split(/\s*[,;]\s*/), function (recipient) {
|
||||
return recipient.trim() !== "";
|
||||
});
|
||||
};
|
||||
|
||||
exports.same_major_recipient = function (a, b) {
|
||||
|
||||
Reference in New Issue
Block a user