FIX: private message button wasn't adding the recipient (cc @gdpelican)
This commit is contained in:
parent
f9f54e2626
commit
0f0a329e7c
|
@ -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);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue