diff --git a/app/assets/javascripts/discourse/routes/application.js.es6 b/app/assets/javascripts/discourse/routes/application.js.es6 index ca598b774..83f8a53a7 100644 --- a/app/assets/javascripts/discourse/routes/application.js.es6 +++ b/app/assets/javascripts/discourse/routes/application.js.es6 @@ -15,7 +15,7 @@ var ApplicationRoute = Discourse.Route.extend({ composePrivateMessage: function(user) { var self = this; this.transitionTo('userActivity', user).then(function () { - self.controllerFor('user-activity').send('composePrivateMessage'); + self.controllerFor('user-activity').send('composePrivateMessage', user); }); }, diff --git a/app/assets/javascripts/discourse/routes/user.js.es6 b/app/assets/javascripts/discourse/routes/user.js.es6 index ac4ddb49c..e72b26d9b 100644 --- a/app/assets/javascripts/discourse/routes/user.js.es6 +++ b/app/assets/javascripts/discourse/routes/user.js.es6 @@ -16,7 +16,7 @@ export default Discourse.Route.extend({ }, composePrivateMessage: function(user) { - var recipient = user ? user.username : ''; + var recipient = user ? user.get('username') : ''; return this.controllerFor('composer').open({ action: Discourse.Composer.PRIVATE_MESSAGE, usernames: recipient, diff --git a/app/assets/javascripts/discourse/templates/user/user.hbs b/app/assets/javascripts/discourse/templates/user/user.hbs index 3f8323efe..a12eb5946 100644 --- a/app/assets/javascripts/discourse/templates/user/user.hbs +++ b/app/assets/javascripts/discourse/templates/user/user.hbs @@ -39,7 +39,7 @@