In discourse/app/assets/javascripts/discourse/routes/application.js.es6
there is this action:
composePrivateMessage
is the action that triggers the composer to write a private message. I am trying to access this action from a component template:
{{action "composePrivateMessage" user}}
In the js for this component I am trying something like this:
export default Ember.Component.extend({
tagName: 'div',
layoutName: 'components/custom-fields-data',
classNameBindings: ['custom-fields'],
actions: {
composePrivateMessage(user) {
composePrivateMessage();
}
},
This does not work, which does not come as a surprise. Do I need to inject the application route or something to have access to the application route’s actions?