FIX: private message button wasn't adding the recipient (cc @gdpelican)

This commit is contained in:
Régis Hanol 2014-12-03 14:55:43 +01:00
parent f9f54e2626
commit 0f0a329e7c
3 changed files with 3 additions and 3 deletions

View File

@ -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);
});
},

View File

@ -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,

View File

@ -39,7 +39,7 @@
<ul>
{{#if can_send_private_message_to_user}}
<li>
<a class='btn btn-primary right' {{action "composePrivateMessage"}}>
<a class='btn btn-primary right' {{action "composePrivateMessage" model}}>
{{fa-icon "envelope"}}
{{i18n user.private_message}}
</a>