mirror of https://github.com/zulip/zulip.git
parent
3680393b47
commit
0e337c015a
|
@ -110,7 +110,7 @@ function get_messages_success(data, opts) {
|
|||
// because doing so breaks the app in various modules that expect emails string.
|
||||
function handle_operators_supporting_id_based_api(data) {
|
||||
var operators_supporting_ids = ['pm-with'];
|
||||
var operators_supporting_id = ['sender', 'group-pm-with'];
|
||||
var operators_supporting_id = ['sender', 'group-pm-with', 'stream'];
|
||||
|
||||
if (data.narrow === undefined) {
|
||||
return data;
|
||||
|
@ -123,6 +123,16 @@ function handle_operators_supporting_id_based_api(data) {
|
|||
}
|
||||
|
||||
if (operators_supporting_id.indexOf(filter.operator) !== -1) {
|
||||
if (filter.operator === 'stream') {
|
||||
const stream_id = stream_data.get_stream_id(filter.operand);
|
||||
if (stream_id !== undefined) {
|
||||
filter.operand = stream_id;
|
||||
}
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
// The other operands supporting object IDs all work with user objects.
|
||||
var person = people.get_by_email(filter.operand);
|
||||
if (person !== undefined) {
|
||||
filter.operand = person.user_id;
|
||||
|
|
Loading…
Reference in New Issue