I’m writing a component with an action that opens the composer.
I want to send a REPLY action and reference a specific post.
I can get the post object, no problem:
ajax(`/posts/${this.get('postId')}`).then((post) => {
composer.open({
action: REPLY,
post, // not a Post model
draftKey: topic.draft_key,
topicBody: 'some pre-filled text',
});
})
But how do I get the post model? (I’m sure it’s pretty obvious, but I can’t figure it out)
I need it because otherwise, post.get() in the composer model fails: