mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
We can use avatar_template
here rather than recreating the logic
This commit is contained in:
parent
7ed522c890
commit
127c13314a
@ -22,13 +22,7 @@ module PrettyText
|
||||
return "" unless user.present?
|
||||
|
||||
# TODO: Add support for ES6 and call `avatar-template` directly
|
||||
if !user.uploaded_avatar_id
|
||||
avatar_template = User.default_template(username)
|
||||
else
|
||||
avatar_template = user.avatar_template
|
||||
end
|
||||
|
||||
UrlHelper.schemaless UrlHelper.absolute avatar_template
|
||||
UrlHelper.schemaless(UrlHelper.absolute(user.avatar_template))
|
||||
end
|
||||
|
||||
def mention_lookup(name)
|
||||
|
Loading…
Reference in New Issue
Block a user