mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +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:
		@@ -25,6 +25,11 @@ var _ = global._;
 | 
			
		||||
 | 
			
		||||
}());
 | 
			
		||||
 | 
			
		||||
(function test_extract_pm_recipients() {
 | 
			
		||||
    assert.equal(util.extract_pm_recipients('bob@foo.com, alice@foo.com').length, 2);
 | 
			
		||||
    assert.equal(util.extract_pm_recipients('bob@foo.com, ').length, 1);
 | 
			
		||||
}());
 | 
			
		||||
 | 
			
		||||
(function test_lower_bound() {
 | 
			
		||||
    var arr = [10, 20, 30, 40, 50];
 | 
			
		||||
    assert.equal(util.lower_bound(arr, 5), 0);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user