mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:49:06 +08:00
FIX: local post onebox was always pointing to 1st post
This commit is contained in:
parent
ac701696b3
commit
3be0294465
|
@ -1,4 +1,4 @@
|
|||
<aside class='quote' data-post="1" data-topic="{{topic_id}}">
|
||||
<aside class='quote' data-post="{{post_number}}" data-topic="{{topic_id}}">
|
||||
<div class='title'>
|
||||
<div class='quote-controls'></div>
|
||||
{{{avatar}}}
|
||||
|
|
|
@ -202,6 +202,7 @@ module Oneboxer
|
|||
else
|
||||
args = {
|
||||
topic_id: topic.id,
|
||||
post_number: post.post_number,
|
||||
avatar: PrettyText.avatar_img(post.user.avatar_template, "tiny"),
|
||||
original_url: url,
|
||||
title: PrettyText.unescape_emoji(CGI::escapeHTML(topic.title)),
|
||||
|
|
|
@ -54,6 +54,7 @@ describe Oneboxer do
|
|||
|
||||
onebox = preview(public_reply.url, user, public_category)
|
||||
expect(onebox).to include(public_reply.excerpt)
|
||||
expect(onebox).to include(%{data-post="2"})
|
||||
expect(onebox).to include(PrettyText.avatar_img(replier.avatar_template, "tiny"))
|
||||
|
||||
onebox = preview(public_reply.url, user, public_category, public_topic)
|
||||
|
|
Loading…
Reference in New Issue
Block a user