Don't send "in" operators to the server, as this is a client-side filter.

(imported from commit 1f3d3c09e24093e038d83985003af0b1c87d4ed8)
This commit is contained in:
Luke Faraone 2013-02-05 13:25:30 -05:00
parent 77d0a07e4f
commit 914aa336c7
2 changed files with 16 additions and 1 deletions

View File

@ -28,6 +28,21 @@ exports.operators = function () {
return current_operators;
};
/* Operators we should send to the server. */
exports.public_operators = function () {
var safe_to_return;
safe_to_return = [];
$.each(current_operators, function (index, value) {
// Currently just filter out the "in" keyword.
if (value[0] !== "in") {
safe_to_return.push(value);
}
});
if (safe_to_return.length !== 0) {
return safe_to_return;
}
};
var allow_collapse;
exports.allow_collapse = function () {

View File

@ -647,7 +647,7 @@ function load_old_messages(anchor, num_before, num_after, cont, for_narrow,
data.stream = lurk_stream;
if (for_narrow && narrow.active())
data.narrow = JSON.stringify(narrow.operators());
data.narrow = JSON.stringify(narrow.public_operators());
function process_result(messages) {
$('#connection-error').hide();