6

So, I am ignoring more than 50 users in chat. However, only (the first?) 50 are displayed in the prefs tab of my chat profile:

For example, I know for sure I ignore this user as well:

Yet as you can see, this user is not showing in the list.

Can we see all the users we ignore, perhaps by adding pagination?

Disclaimer: all the users ignored were chosen randomly for the sake of reporting this bug.

  • 5
    ignoring 50+ people ... why bother visiting the chats in the first place :p – user202362 Feb 17 '16 at 14:47
  • 3
    @Tel pure scientific reasons, of course. Those who really ignore so many deserve, umm, to be ignored by everyone! :D – Shadow Wizard Wearing Mask Feb 17 '16 at 14:48
  • I though we weren't suppose to name and shame users in meta? Perhaps you should have censored that screenshot ;) – DavidPostill Feb 17 '16 at 16:49
  • 1
    @DavidPostill read the disclaimer. :-) – Shadow Wizard Wearing Mask Feb 17 '16 at 17:19
  • 1
    That's even worse. You are randomly shaming users ;) – DavidPostill Feb 17 '16 at 17:20
  • @David nope, being ignored by me is a great honor. :-D – Shadow Wizard Wearing Mask Feb 17 '16 at 17:23
  • 3
    Is there some place/one where we can complain to if we're not being ignored by @ShadowWizard then? – Robert Longson Feb 17 '16 at 18:04
  • 1
    I guess in the Den @RobertLongson – rene Feb 17 '16 at 18:05
  • I think it is actually paginated, it's just hidden. Try adding &page=2 onto the URL. – ArtOfCode Feb 22 '16 at 16:46
  • Nice idea @Art but no luck. Tried both "&page=2" and "&p=2". – Shadow Wizard Wearing Mask Feb 22 '16 at 18:44
4

I've fixed this in a userscript.

// ==UserScript==
// @name          SE Chat Ignore List Fix
// @description   Fixes broken chat ignore list.
// @version       1.0.0
// @date          2016-02-22
// @author        Eyeballcode
// @contact       eyeballcode@gmail.com
// @namespace     http://eyeballcode.github.io/se-chat-ignore-fix/
// @include       *://chat.stackexchange.com/users/*
// @include       *://chat.meta.stackexchange.com/users/*
// @include       *://chat.stackoverflow.com/users/*
// @require       https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js
// @run-at        document-start
// ==/UserScript==

function normalizeName(realName) {
    return realName.trim().toLowerCase().replace(/ +/g, '-').replace(/[!@#\$%^&*\()\{}\[\]|\\;:'",\./?<>~`_+=]/g, '');
}

function addUser(userid) {
    $.ajax({method: 'get', url: '/users/thumbs/' + userid}).success(function (user) {
        var username = user.name,
            status = user.user_message,
            image;
        if (user.email_hash.startsWith('!'))
            image = user.email_hash.substr(1);
        else
            image = 'http://www.gravatar.com/avatar/' + user.email_hash + '?s=128&d=identicon&r=PG';
        $('#ignore-list').append(
            $('<div>').attr('id', 'user-' + userid).attr('class', 'usercard  usercard-mini').append(
                $('<div>').attr('class', 'user-header').attr('title', username).append(
                    $('<a>').attr('href', '/users/' + userid + '/' + normalizeName(username).toLowerCase()).append(
                        $('<img>').attr('height', '48').attr('width', '48')
                            .attr('class', 'user-gravatar48').attr('srcset', image)
                            .attr('src', image.replace(/\?s=128/, '?s=48')).attr('alt', username)
                    )
                ).append(
                    $('<h3>').append(
                        $('<a>').attr('class', 'username')
                            .attr('href', '/users/' + userid + '/' + normalizeName(username).toLowerCase()).text(username)
                    )
                ).append(
                    $('<div>').attr('class', 'user-message-info').attr('title', status).text(status)
                ).append(
                    $('<div>').attr('class', 'clear-both')
                )
            ).append(
                $('<span>').attr('class', 'btn-delete')
            )
        );
    });
};


$(function () {
    if (!(!!location.pathname.match(/\/users\/\d+\/[\w-]+/) && location.search === '?tab=prefs')) return;
    var alreadyDone = [];
    $('#ignore-list').find('> div').each(function (i, e) {
        alreadyDone.push(e.id.substring('user-'.length));
    });
    $('#ignore-list').find('> p:nth-child(1)').text('Fetching ignore list, please wait...');
    $.ajax({method: 'get', url: '/users/ignorelist'}).success(function (data) {
        if (data.length === 0) {
            $('#ignore-list').find('> p:nth-child(1)').text('You\'re not ignoring anyone.');
            return;
        }
        $('#ignore-list').find('> p:nth-child(1)').text('You are ignoring the following users. Click the X to stop ignoring a user.');
        data.forEach(function (e) {
            if (alreadyDone.indexOf(e) == -1)
                addUser(e);
        });
    });
    $('.btn-delete').click(function () {
        if ($('#ignore-list').find('> div').length === 1) {
            $('#ignore-list').find('> p:nth-child(1)').text('You\'re not ignoring anyone.');
        }
    });
});

Haha, it works.


Edit 1: Fixed this

Edit 2: Bug fixes, when you remove the last user it switches back to telling you that you don't block anyone.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .