mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Rename user_id(s)_supported_operators -> operators_supporting_id(s).
This commit is contained in:
committed by
Tim Abbott
parent
99450f336c
commit
1edde4a989
@@ -109,8 +109,8 @@ function get_messages_success(data, opts) {
|
||||
// or convert the emails string to user IDs directly into the Filter code
|
||||
// because doing so breaks the app in various modules that expect emails string.
|
||||
function handle_user_ids_supported_operators(data) {
|
||||
var user_ids_supported_operators = ['pm-with'];
|
||||
var user_id_supported_operators = ['sender', 'group-pm-with'];
|
||||
var operators_supporting_ids = ['pm-with'];
|
||||
var operators_supporting_id = ['sender', 'group-pm-with'];
|
||||
|
||||
if (data.narrow === undefined) {
|
||||
return data;
|
||||
@@ -118,11 +118,11 @@ function handle_user_ids_supported_operators(data) {
|
||||
|
||||
data.narrow = JSON.parse(data.narrow);
|
||||
data.narrow = _.map(data.narrow, function (filter) {
|
||||
if (user_ids_supported_operators.indexOf(filter.operator) !== -1) {
|
||||
if (operators_supporting_ids.indexOf(filter.operator) !== -1) {
|
||||
filter.operand = people.emails_strings_to_user_ids_array(filter.operand);
|
||||
}
|
||||
|
||||
if (user_id_supported_operators.indexOf(filter.operator) !== -1) {
|
||||
if (operators_supporting_id.indexOf(filter.operator) !== -1) {
|
||||
var person = people.get_by_email(filter.operand);
|
||||
if (person !== undefined) {
|
||||
filter.operand = person.user_id;
|
||||
|
||||
Reference in New Issue
Block a user