Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching conversations with date fields always returns an empty result #381

Open
sannana opened this issue Sep 7, 2023 · 0 comments
Open

Comments

@sannana
Copy link

sannana commented Sep 7, 2023

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

  1. 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)
  }

Logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant