aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-04-21 08:23:12 +0200
committerLibravatar GitHub <noreply@github.com>2020-04-21 08:23:12 +0200
commit881cc6e67b9b11a5b186b3fc169a7a84c467bbf1 (patch)
tree35b9c3d9f40926f8d92dbbf483d2c738671f42c4 /uncompressed
parentMerge pull request #126 from halms/pr-instagramicons (diff)
parentUpdate slack notifications to exclude draft messages (diff)
downloadferdium-recipes-881cc6e67b9b11a5b186b3fc169a7a84c467bbf1.tar.gz
ferdium-recipes-881cc6e67b9b11a5b186b3fc169a7a84c467bbf1.tar.zst
ferdium-recipes-881cc6e67b9b11a5b186b3fc169a7a84c467bbf1.zip
Merge pull request #127 from Serubin/fix/slack-draft-notifications
Update Slack: notifications to exclude draft messages
Diffstat (limited to 'uncompressed')
-rw-r--r--uncompressed/slack/package.json2
-rw-r--r--uncompressed/slack/webview.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/uncompressed/slack/package.json b/uncompressed/slack/package.json
index 61701b3..987ce6a 100644
--- a/uncompressed/slack/package.json
+++ b/uncompressed/slack/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "slack", 2 "id": "slack",
3 "name": "Slack", 3 "name": "Slack",
4 "version": "1.0.14", 4 "version": "1.0.15",
5 "description": "Slack", 5 "description": "Slack",
6 "main": "index.js", 6 "main": "index.js",
7 "author": "Stefan Malzner <stefan@adlk.io>", 7 "author": "Stefan Malzner <stefan@adlk.io>",
diff --git a/uncompressed/slack/webview.js b/uncompressed/slack/webview.js
index 0d250e5..2b54c71 100644
--- a/uncompressed/slack/webview.js
+++ b/uncompressed/slack/webview.js
@@ -41,7 +41,7 @@ const SELECTOR_CHANNELS_UNREAD = '.p-channel_sidebar__channel--unread:not(.p-cha
41 41
42module.exports = Franz => { 42module.exports = Franz => {
43 const getMessages = () => { 43 const getMessages = () => {
44 const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread:not([data-sidebar-link-id="Punreads"]`).length; 44 const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread:not([data-sidebar-link-id="Punreads"]):not([data-sidebar-link-id="Pdrafts"])`).length;
45 const allMessages = document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - directMessages; 45 const allMessages = document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - directMessages;
46 Franz.setBadge(directMessages, allMessages); 46 Franz.setBadge(directMessages, allMessages);
47 }; 47 };
@@ -51,4 +51,4 @@ module.exports = Franz => {
51 getTeamIcon(); 51 getTeamIcon();
52 }, 4000); 52 }, 4000);
53 Franz.injectCSS(_path.default.join(__dirname, 'service.css')); 53 Franz.injectCSS(_path.default.join(__dirname, 'service.css'));
54}; \ No newline at end of file 54};