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

API livechat/visitors.search only filter visitors with name starts with query term #18868

Closed
galiazzi opened this issue Sep 11, 2020 · 2 comments

Comments

@galiazzi
Copy link

Description:

In release 3.6.0 was introduced the api livechat/visitors.search (#18514)

There is a reason for filter by name only with string starts with? Maybe can be with contains?

name: new RegExp(`^${ s.escapeRegExp(_emailOrPhoneOrNameOrUsername).trim() }`, 'i'),

Steps to reproduce:

  1. Call api /livechat/visitors.search?term=value

Expected behavior:

Search all visitors with name contains value

Actual behavior:

List visitors with name starts with value

Server Setup Information:

  • Version of Rocket.Chat Server:
  • Operating System: Linux
  • Deployment Method: tar
  • Number of Running Instances: 1
  • NodeJS Version: v12.14.0
  • MongoDB Version: 4.2.8

Client Setup Information

  • Browser Version: Chrome 85
  • Operating System: Linux
@leolage
Copy link

leolage commented Sep 28, 2020

This is very good! awesome! Thanks!

If I need can I delete a visitor? I'm trying to update user details, but in a lot of cases I need to delete the visitor to recreate them, its possible?

Thanks

@galiazzi
Copy link
Author

This was fixed in version 3.9.0 #19577

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

2 participants