diff --git a/lib/oneboxer/discourse_local_onebox.rb b/lib/oneboxer/discourse_local_onebox.rb index 3d500acb9..8329737dc 100644 --- a/lib/oneboxer/discourse_local_onebox.rb +++ b/lib/oneboxer/discourse_local_onebox.rb @@ -57,10 +57,12 @@ module Oneboxer post = topic.posts.first posters = topic.posters_summary.map do |p| - {username: p[:user][:username], - avatar: PrettyText.avatar_img(p[:user][:avatar_template], 'tiny'), - description: p[:description], - extras: p[:extras]} + { + username: p[:user].username, + avatar: PrettyText.avatar_img(p[:user].avatar_template, 'tiny'), + description: p[:description], + extras: p[:extras] + } end category = topic.category @@ -70,7 +72,7 @@ module Oneboxer quote = post.excerpt(SiteSetting.post_onebox_maxlength) args.merge! title: topic.title, - avatar: PrettyText.avatar_img(topic.user.username, 'tiny'), + avatar: PrettyText.avatar_img(topic.user.avatar_template, 'tiny'), posts_count: topic.posts_count, last_post: FreedomPatches::Rails4.time_ago_in_words(topic.last_posted_at, false, scope: :'datetime.distance_in_words_verbose'), age: FreedomPatches::Rails4.time_ago_in_words(topic.created_at, false, scope: :'datetime.distance_in_words_verbose'), diff --git a/lib/oneboxer/templates/discourse_topic_onebox.hbrs b/lib/oneboxer/templates/discourse_topic_onebox.hbrs index bcced0494..cce69d1ba 100644 --- a/lib/oneboxer/templates/discourse_topic_onebox.hbrs +++ b/lib/oneboxer/templates/discourse_topic_onebox.hbrs @@ -1,23 +1,20 @@ - - -