mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
fix: Add default 404 param on gravatar (#1316)
This commit is contained in:
@@ -114,7 +114,7 @@ class User < ApplicationRecord
|
|||||||
def avatar_url
|
def avatar_url
|
||||||
if avatar_img_url == ''
|
if avatar_img_url == ''
|
||||||
hash = Digest::MD5.hexdigest(email)
|
hash = Digest::MD5.hexdigest(email)
|
||||||
return "https://www.gravatar.com/avatar/#{hash}"
|
return "https://www.gravatar.com/avatar/#{hash}?d=404"
|
||||||
end
|
end
|
||||||
avatar_img_url
|
avatar_img_url
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user