Community-edition: Discord not showing red badge on tab even when there are unread messaged and notifs

Created on 30 Jan 2018  Â·  5Comments  Â·  Source: ramboxapp/community-edition

Steps to reproduce

  1. Latest Rambox 0.5.14 on Mac
  2. Add Discord account
  3. No Notifs

Expected behavior

Expect red badge when notification settings are on in Rambox as well as Discord

Actual behavior

No red badge

Most helpful comment

Experiencing the same issue on the latest version (and previous ones as well), confirmed right now that @Ash258's solution works, just one small detail, the logo URL should be:
https://github.com/saenzramiro/rambox/raw/master/resources/icons/discord.png

Rambox 0.5.17
Electron 1.8.4
win32 x64 10.0.15063

All 5 comments

Im experiencing this issue as well. 0.5.16 on Pop! OS 17.10:

Version: 0.5.16
Platform: linux (x64)
Electron: 1.8.3
Chromium: 59.0.3071.115
Node: 8.2.1

This is a dublicate of #1240 - but either ticket, it would be great to solve this ;)

Wokraround for now (unless new rambox version)

  1. Add Discord as custom service
  2. Click advanced
  3. Past code below into Custom Code box
function getAlertCount(badges) {
    var alerts = 0;
    for (var i = 0; i < badges.length; i++) {
        var badge = badges[i];
        if (badge && badge.childNodes && badge.childNodes.length > 0) {
            var count = parseInt(badge.childNodes[0].nodeValue, 10);
            alerts += count.isNaN
                ? 1
                : count;
        } else {
            alerts++;
        }
    }
    return alerts;
}

function checkUnread() {
    var direct = 0,
        indirect = document.querySelectorAll('.guilds-wrapper .unread').length,
        guildDirect = document.querySelectorAll('.guilds-wrapper .badge'),
        channelDirect = document.querySelectorAll('[class^="nameUnreadText-"]+div>div>div');

    direct += getAlertCount(guildDirect);
    direct += getAlertCount(channelDirect);
    indirect += document.querySelectorAll('[class^="nameUnreadText-"]').length;

    updateBadge(indirect, direct);
}

function updateBadge(ind, dir) {
    var n = dir > 0
        ? "(" + dir + ") "
        : ind > 0
            ? "(•) "
            : "";
    document.title = n + originalTitle;
}

var originalTitle = document.title;
setInterval(checkUnread, 3e3);

Experiencing the same issue on the latest version (and previous ones as well), confirmed right now that @Ash258's solution works, just one small detail, the logo URL should be:
https://github.com/saenzramiro/rambox/raw/master/resources/icons/discord.png

Rambox 0.5.17
Electron 1.8.4
win32 x64 10.0.15063

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

MakuSensei picture MakuSensei  Â·  4Comments

soulchainer picture soulchainer  Â·  3Comments

biggestchops picture biggestchops  Â·  3Comments

saalkom picture saalkom  Â·  3Comments

menzow picture menzow  Â·  4Comments