mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
fix(chatwoot): error: invalid operator. The allowed operators for identifier are [equal_to,not_equal_to]
In chatwoot version 3.8 we can't use the filter operator 'contains' for the field 'identifier'
This commit is contained in:
parent
b6c56551bc
commit
9c9a542bbe
@ -461,7 +461,7 @@ export class ChatwootService {
|
|||||||
const queryOperator = fieldsToSearch.length - 1 === index1 && numbers.length - 1 === index2 ? null : 'OR';
|
const queryOperator = fieldsToSearch.length - 1 === index1 && numbers.length - 1 === index2 ? null : 'OR';
|
||||||
filterPayload.push({
|
filterPayload.push({
|
||||||
attribute_key: field,
|
attribute_key: field,
|
||||||
filter_operator: field == 'phone_number' ? 'equal_to' : 'contains',
|
filter_operator: ['phone_number', 'identifier'].includes(field) ? 'equal_to' : 'contains',
|
||||||
values: [number.replace('+', '')],
|
values: [number.replace('+', '')],
|
||||||
query_operator: queryOperator,
|
query_operator: queryOperator,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user