We can use avatar_template here rather than recreating the logic

This commit is contained in:
Robin Ward 2017-10-06 14:00:39 -04:00
parent 7ed522c890
commit 127c13314a

View File

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