PatrickJS / angular-intercom

An Angular.js wrapper for Intercom.io providing a simple and familiar API for Angular Developer.
MIT License
89 stars 36 forks source link

When/how to call $intercom.update() #19

Open juanpasolano opened 9 years ago

juanpasolano commented 9 years ago

This is not a bug report. I just want to know what would be the best way to call $intercom.update() so the chat can work sort of realtime. I have received this message from an Intercom representative and I am wondering how to handle this chat issue.

Intercom only checks for new user messages when the Intercom javascript loads, which happens on a page refresh or when a user opens the message window. You can use the Javascript API and call Intercom('update') to check for new messages more frequently, but that will still only work when the message window is closed. We're working on real time chat, but it's not quite there yet. Let me know if you have any other questions.

Thanks for sharing this module.

niemyjski commented 9 years ago

Here is how I did it: https://github.com/exceptionless/Exceptionless.UI/blob/d977e286bb7736f3ae3eee9dee73a4c3e2fa3cf1/src/components/intercom/intercom-directive.js#L136-L147

Please note that I contacted them before setting my interval and asked what the interval should be as they rate-limit the update call.

juanpasolano commented 9 years ago

Thanks I will run with that interval.