Skip to content

Commit c8cea66

Browse files
committed
Update slack: Fix incorrect notification count meetfranz/recipe-slack#13
1 parent e717341 commit c8cea66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

uncompressed/slack/webview.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const SELECTOR_CHANNELS_UNREAD = '.p-channel_sidebar__channel--unread:not(.p-cha
4141

4242
module.exports = Franz => {
4343
const getMessages = () => {
44-
const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread`).length;
44+
const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread:not([data-sidebar-link-id="Punreads"]`).length;
4545
const allMessages = document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - directMessages;
4646
Franz.setBadge(directMessages, allMessages);
4747
};
@@ -51,4 +51,4 @@ module.exports = Franz => {
5151
getTeamIcon();
5252
}, 4000);
5353
Franz.injectCSS(_path.default.join(__dirname, 'service.css'));
54-
};
54+
};

0 commit comments

Comments
 (0)