mirror of https://github.com/zulip/zulip.git
Don't send "in" operators to the server, as this is a client-side filter.
(imported from commit 1f3d3c09e24093e038d83985003af0b1c87d4ed8)
This commit is contained in:
parent
77d0a07e4f
commit
914aa336c7
|
@ -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 () {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue