Community-edition: Slack receive notification for muted channels

Created on 20 Sep 2017  路  4Comments  路  Source: ramboxapp/community-edition

Steps to reproduce

  1. In slack, mute a channel
  2. Have someone say something in that channel

Expected behavior

No notification on the slack logo in the top bar.

Actual behavior

Notification on the slack logo in the top bar.

ENVIRONMENT

Rambox: v0.5.12

OS: OSX 10.12.6 (16G29)

Arch: x64

Most helpful comment

I can confirm this on my installation too (0.5.12 on x86_64 Arch Linux) - I was able to fix it with this custom JS snippet:

function checkUnread() {
    var a = $('.p-channel_sidebar__channel--unread:not([class*="p-channel_sidebar__channel--muted"])').length;
    var b = 0;
    $(".p-channel_sidebar__badge").each(function() {
        b += isNaN(parseInt($(this).html())) ? 0 : parseInt($(this).html())
    });
    updateBadge(a, b)
}

All 4 comments

I can confirm this on my installation too (0.5.12 on x86_64 Arch Linux) - I was able to fix it with this custom JS snippet:

function checkUnread() {
    var a = $('.p-channel_sidebar__channel--unread:not([class*="p-channel_sidebar__channel--muted"])').length;
    var b = 0;
    $(".p-channel_sidebar__badge").each(function() {
        b += isNaN(parseInt($(this).html())) ? 0 : parseInt($(this).html())
    });
    updateBadge(a, b)
}

I just saw this issue after i spent an hour getting a build working to fix it. My pull request should fix the issue permanently.

Instead of using setInterval to poll for the notifications classes, perhaps Rambox could use the MutationObserver API? I don't know if it's available in electron, though!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LiBOSS-CZ picture LiBOSS-CZ  路  4Comments

leif picture leif  路  4Comments

bnn-y picture bnn-y  路  4Comments

igalic picture igalic  路  3Comments

julien-tmp picture julien-tmp  路  4Comments