From 127c13314a71614d71e7236fc09f8c7fb68176f1 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 6 Oct 2017 14:00:39 -0400 Subject: [PATCH] We can use `avatar_template` here rather than recreating the logic --- lib/pretty_text/helpers.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/pretty_text/helpers.rb b/lib/pretty_text/helpers.rb index 22383b3cec6..5d19b8ead16 100644 --- a/lib/pretty_text/helpers.rb +++ b/lib/pretty_text/helpers.rb @@ -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)