Permalink
Browse files

Badge now displays only unread conversations.

  • Loading branch information...
1 parent b6773da commit 0f78bf0d623e83400b79b02cde0740d4c32a1c96 @julienma julienma committed Nov 8, 2016
Showing with 6 additions and 6 deletions.
  1. +1 −1 chatra/package.json
  2. +5 −5 chatra/webview.js
View
@@ -8,7 +8,7 @@
"config": {
"serviceURL": "https://app.chatra.io/",
"serviceName": "Chatra",
- "message": "Live chat software that helps to increase revenue and collect feedback providing an easy way for website owners to talk to visitors in real time.",
+ "message": "",
"popup": [],
"hasTeamID": false,
"hasNotificationSound": true,
View
@@ -2,15 +2,15 @@ const path = require('path');
module.exports = (Franz, options) => {
const getMessages = () => {
- // get unread messages
- const myQueue = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:my"] .count').text();
+ // get new conversations in My Queue
+ const myQueue = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:my"] .count').not('.count--gray').text();
- // get conversations in 'My Inbox'
+ // get all missed conversations
const missed = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:missed"] .count').text();
// set Franz badge
- // myQueue => My Queue count
- // missed => Missed count
+ // myQueue => New conversations in My Queue
+ // missed => All missed conversations
Franz.setBadge(myQueue, missed);
};

0 comments on commit 0f78bf0

Please sign in to comment.