The same code pasted directly into the editor is highlighted:
composePrivateMessage(user, post) {
const recipient = user ? user.get('username') : '',
reply = post ? window.location.protocol + "//" + window.location.host + post.get("url") : null;
// used only once, one less dependency
return this.controllerFor('composer').open({
action: Composer.PRIVATE_MESSAGE,
usernames: recipient,
archetypeId: 'private_message',
draftKey: 'new_private_message',
reply: reply
});
},