crisp-im / node-crisp-api

:zap: Crisp API Node Wrapper
https://docs.crisp.chat/guides/rest-api/
MIT License
99 stars 39 forks source link

findWithSearch is double encoding the query parameters, which is corrupting the search query in some cases. #32

Closed bdevore17 closed 3 years ago

bdevore17 commented 3 years ago

https://github.com/crisp-im/node-crisp-api/blob/5fcba72fe6b73af3104d55c3cc1c48373542176c/lib/resources/WebsiteConversations.js#L61

got is already encoding query parameters, so it is harmful to do it ahead of time.

bdevore17 commented 3 years ago

For example, a search query of +1 is being encoded into %252B1 instead of %2B1

bdevore17 commented 3 years ago

@eliottvincent Can you please cut a new release with this fix?

eliottvincent commented 3 years ago

Sure!

bdevore17 commented 3 years ago

Thank you!

eliottvincent commented 3 years ago

Released version 1.12.3: https://www.npmjs.com/package/node-crisp-api/v/1.12.3