Searching conversations with date fields always returns an empty result
Opened this issue · 0 comments
sannana commented
Version info
- intercom-node version: 4.0.0
- Node version: v18.13.0 (npm v8.19.3)
Expected behavior
Searching conversations with date fields should return matching conversations
Actual behavior
The use of any date field, in any way, in conversations searc,h leads to an empty result
Steps to reproduce
- Try to search conversation, using any date field, for example:
try {
const conversations = await client.conversations.search({
data: {
query: {
'operator': Operators.AND,
'value': [
{
'field': 'contact_ids',
'operator': Operators.EQUALS,
'value': userId
},
{
'field': 'open',
'operator': Operators.EQUALS,
'value': true
},
{
'field': 'created_at',
'operator': Operators.LESS_THAN,
'value': Date.now()
},
]
},
},
})
return conversations
} catch (error) {
console.error('Error searching conversations:', error.message)
}