このAPIはウェブチャットV3でのみ利用可能です。
未読メッセージ数を取得します。
Syntax:
chat.getUnreadMessageCount(function(err, count) {...});Arguments:
| Name | Type | Description |
|---|---|---|
| err | Object | エラー |
| count | Number | 未読メッセージ数 |
// 例) 未読メッセージがある場合に、widgetを表示する
chat.getUnreadMessageCount(function(err, count) {
if (err) return console.log('[KARTE fetchProjectStatus err]' + err);
if (count > 0) {
chat.activate();
}
});