Use "?" instead of user ID as seed for the image placeholder

The seed of the image placeholder is needed to generate the background
color of the image, but as the background color is later overriden any
seed could be used. When no text is explicitly given the seed is used as
text too, so there is no need to pass the user ID and simply using "?"
as seed is enough.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
pull/6591/head
Daniel Calviño Sánchez 7 years ago
parent ff71dd07a6
commit ea10a1292a

@ -113,7 +113,7 @@
$div.imageplaceholder(user, result.data.displayname);
} else {
// User does not exist
$div.imageplaceholder(user, '?');
$div.imageplaceholder('?');
$div.css('background-color', '#b9b9b9');
}
} else {

@ -99,7 +99,7 @@ describe('jquery.avatar tests', function() {
})
);
expect($div.imageplaceholder).toHaveBeenCalledWith('foo', '?');
expect($div.imageplaceholder).toHaveBeenCalledWith('?');
expect($div.css).toHaveBeenCalledWith('background-color', '#b9b9b9');
});

Loading…
Cancel
Save