mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FEATURE: show poster avatar for remote Discourse post onebox
This commit is contained in:
parent
0db0f83787
commit
e30c8239a2
1 changed files with 6 additions and 1 deletions
|
@ -170,8 +170,13 @@ class TopicView
|
|||
end
|
||||
|
||||
def image_url
|
||||
if @post_number.present? && @post_number.to_i != 1 && @desired_post.present?
|
||||
# show poster avatar
|
||||
@desired_post.user.avatar_template_url.gsub("{size}", "100") if @desired_post.user
|
||||
else
|
||||
@topic.image_url || SiteSetting.default_opengraph_image_url
|
||||
end
|
||||
end
|
||||
|
||||
def filter_posts(opts = {})
|
||||
return filter_posts_near(opts[:post_number].to_i) if opts[:post_number].present?
|
||||
|
|
Loading…
Reference in a new issue