blob: be1040cc2160e62a8024b82649137ffc07a20b30 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const path = require('path');
module.exports = (Franz, options) => {
const getMessages = () => {
// get unread messages
// const updates = document.getElementById('franz').getAttribute('data-unread');
const count = $('.unread').length;
Franz.setBadge(count);
// get conversations in 'My Inbox'
// const inbox = document.getElementById('franz').getAttribute('data-inbox');
// set Franz badge
// updates => active unread count
// inbox => passive unread count
// Franz.setBadge(updates, inbox);
};
// check for new messages every second and update Franz badge
Franz.loop(getMessages);
};
|