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>
This commit is contained in:
Daniel Calviño Sánchez 2017-09-20 18:14:00 +02:00
parent ff71dd07a6
commit ea10a1292a
2 changed files with 2 additions and 2 deletions

View file

@ -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 {

View file

@ -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');
});