mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-30 18:47:51 +00:00
@@ -110,6 +110,15 @@ class User < ApplicationRecord
|
||||
inboxes.where(account_id: Current.account.id)
|
||||
end
|
||||
|
||||
alias avatar_img_url avatar_url
|
||||
def avatar_url
|
||||
if avatar_img_url == ''
|
||||
hash = Digest::MD5.hexdigest(email)
|
||||
return "https://www.gravatar.com/avatar/#{hash}"
|
||||
end
|
||||
avatar_img_url
|
||||
end
|
||||
|
||||
def administrator?
|
||||
current_account_user&.administrator?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user