twilio / twilio-chat-demo-js

Programmable Chat API Demo Application for JavaScript
BSD 3-Clause "New" or "Revised" License
90 stars 94 forks source link

getUnreadMessagesCount commented out #16

Closed guiomie closed 5 years ago

guiomie commented 7 years ago

Hi,

Why is the following piece of code commented out? I'm having issues using getUnreadMessagesCount() in my own project and I'm wondering if this function is simply broken?

/*
  channel.getUnreadMessagesCount().then(count => {
    if (count > 0) {
      $el.addClass('new-messages');
      $count.text(count);
    }
  });
  */
uttampanara commented 7 years ago

I have found temp solution for this issue replace getUnreadMessagesCount by getUnconsumedMessagesCount method and it's work

guiomie commented 7 years ago

I've tried this function and it also returns 0...

getUnreadMessagesCount() actually gives getUnreadMessagesCount is not a function