mirror of
https://github.com/discourse/discourse.git
synced 2025-03-24 23:35:51 +08: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?
|
return "" unless user.present?
|
||||||
|
|
||||||
# TODO: Add support for ES6 and call `avatar-template` directly
|
# TODO: Add support for ES6 and call `avatar-template` directly
|
||||||
if !user.uploaded_avatar_id
|
UrlHelper.schemaless(UrlHelper.absolute(user.avatar_template))
|
||||||
avatar_template = User.default_template(username)
|
|
||||||
else
|
|
||||||
avatar_template = user.avatar_template
|
|
||||||
end
|
|
||||||
|
|
||||||
UrlHelper.schemaless UrlHelper.absolute avatar_template
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def mention_lookup(name)
|
def mention_lookup(name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user