Skip to content

Commit 7a01eb4

Browse files
committed
fix: init fix
1 parent 5fc6b58 commit 7a01eb4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/libs/SearchQueryUtils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,14 @@ function getQueryWithUpdatedValues(query: string, shouldSkipAmountConversion = f
15511551

15521552
const computeNodeValue = (left: ValueOf<typeof CONST.SEARCH.SYNTAX_FILTER_KEYS>, right: string | string[]) => getUpdatedFilterValue(left, right, shouldSkipAmountConversion);
15531553
const standardizedQuery = traverseAndUpdatedQuery(queryJSON, computeNodeValue);
1554+
const normalizedQuery = query.toLowerCase();
1555+
const hasInFilter = normalizedQuery.includes(`${CONST.SEARCH.SYNTAX_FILTER_KEYS.IN.toLowerCase()}:`);
1556+
const hasExplicitType = normalizedQuery.includes(`${CONST.SEARCH.SYNTAX_ROOT_KEYS.TYPE.toLowerCase()}:`);
1557+
1558+
if (hasInFilter && !hasExplicitType) {
1559+
standardizedQuery.type = CONST.SEARCH.DATA_TYPES.CHAT;
1560+
}
1561+
15541562
return buildSearchQueryString(standardizedQuery);
15551563
}
15561564

0 commit comments

Comments
 (0)