reply to first post === reply to topic

This commit is contained in:
Sam
2013-07-16 15:42:18 +10:00
parent a3155858a0
commit fce2d0e3b6
2 changed files with 47 additions and 42 deletions
@@ -100,11 +100,16 @@ Discourse.QuoteButtonController = Discourse.Controller.extend({
var post = this.get('post');
var composerController = this.get('controllers.composer');
var composerOpts = {
post: post,
action: Discourse.Composer.REPLY,
draftKey: this.get('post.topic.draft_key')
};
if(post.get('post_number') === 1) {
composerOpts.topic = post.get("topic");
} else {
composerOpts.post = post;
}
// If the composer is associated with a different post, we don't change it.
var composerPost = composerController.get('content.post');
if (composerPost && (composerPost.get('id') !== this.get('post.id'))) {