Use identicon image for default gravatar. (#2767)
* Use identicon image for default gravatar. * Fixed tests.
This commit is contained in:
parent
e4990ba205
commit
81d1e54a49
3 changed files with 4 additions and 4 deletions
|
@ -211,7 +211,7 @@ func AvatarLink(email string) string {
|
|||
}
|
||||
|
||||
if !setting.DisableGravatar {
|
||||
return setting.GravatarSource + HashEmail(email)
|
||||
return setting.GravatarSource + HashEmail(email) + "?d=identicon"
|
||||
}
|
||||
|
||||
return DefaultAvatarLink()
|
||||
|
|
|
@ -135,7 +135,7 @@ func TestAvatarLink(t *testing.T) {
|
|||
|
||||
setting.DisableGravatar = false
|
||||
assert.Equal(t,
|
||||
"353cbad9b58e69c96154ad99f92bedc7",
|
||||
"353cbad9b58e69c96154ad99f92bedc7?d=identicon",
|
||||
AvatarLink("gitea@example.com"),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue