mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: avatars in discourse's topic oneboxes
This commit is contained in:
@ -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'),
|
||||
|
Reference in New Issue
Block a user