reply as new topic requires a post

This commit is contained in:
Régis Hanol 2016-06-14 20:55:58 +02:00
parent 55b300bae1
commit 7efd9359ec
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ export default Ember.Controller.extend({
},
replyAsNewTopic() {
this.get("controllers.topic").send("replyAsNewTopic");
const topicController = this.get("controllers.topic");
const postStream = topicController.get("model.postStream");
const postId = postStream.findPostIdForPostNumber(this.get("postNumber"));
const post = postStream.findLoadedPost(postId);
topicController.send("replyAsNewTopic", post);
this.send("close");
},