mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 05:53:43 +00:00
Remove unused util.recipient_key() function.
(imported from commit cee6a58344971ee1439e6b66ec301f1bd0f80502)
This commit is contained in:
committed by
Leo Franchi
parent
50bc5401a4
commit
0e129614cf
@@ -135,14 +135,6 @@ exports.same_recipient = function util_same_recipient(a, b) {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.recipient_key = function (message) {
|
|
||||||
if (message.type === 'stream') {
|
|
||||||
return message.stream.toLowerCase() + ">" + message.subject.toLowerCase();
|
|
||||||
} else {
|
|
||||||
return exports.normalize_recipients(message.reply_to);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.same_sender = function util_same_sender(a, b) {
|
exports.same_sender = function util_same_sender(a, b) {
|
||||||
return ((a !== undefined) && (b !== undefined) &&
|
return ((a !== undefined) && (b !== undefined) &&
|
||||||
(a.sender_email === b.sender_email));
|
(a.sender_email === b.sender_email));
|
||||||
|
|||||||
@@ -67,20 +67,6 @@ var util = global.util;
|
|||||||
));
|
));
|
||||||
}());
|
}());
|
||||||
|
|
||||||
(function test_recipient_key() {
|
|
||||||
var message;
|
|
||||||
|
|
||||||
message = {type: 'stream', stream: 'Foo', subject: 'BAR'};
|
|
||||||
assert.equal(util.recipient_key(message), 'foo>bar');
|
|
||||||
|
|
||||||
global.$.trim = function (s) {
|
|
||||||
return s.trim();
|
|
||||||
};
|
|
||||||
message = {type: 'private', reply_to: ' bob@example.com, alice@example.com '};
|
|
||||||
assert.equal(util.recipient_key(message), 'alice@example.com,bob@example.com');
|
|
||||||
|
|
||||||
}());
|
|
||||||
|
|
||||||
(function test_robust_uri_decode() {
|
(function test_robust_uri_decode() {
|
||||||
assert.equal(util.robust_uri_decode('xxx%3Ayyy'), 'xxx:yyy');
|
assert.equal(util.robust_uri_decode('xxx%3Ayyy'), 'xxx:yyy');
|
||||||
assert.equal(util.robust_uri_decode('xxx%3'), 'xxx');
|
assert.equal(util.robust_uri_decode('xxx%3'), 'xxx');
|
||||||
|
|||||||
Reference in New Issue
Block a user