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) {
|
composePrivateMessage: function(user) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.transitionTo('userActivity', user).then(function () {
|
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) {
|
composePrivateMessage: function(user) {
|
||||||
var recipient = user ? user.username : '';
|
var recipient = user ? user.get('username') : '';
|
||||||
return this.controllerFor('composer').open({
|
return this.controllerFor('composer').open({
|
||||||
action: Discourse.Composer.PRIVATE_MESSAGE,
|
action: Discourse.Composer.PRIVATE_MESSAGE,
|
||||||
usernames: recipient,
|
usernames: recipient,
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
{{#if can_send_private_message_to_user}}
|
{{#if can_send_private_message_to_user}}
|
||||||
<li>
|
<li>
|
||||||
<a class='btn btn-primary right' {{action "composePrivateMessage"}}>
|
<a class='btn btn-primary right' {{action "composePrivateMessage" model}}>
|
||||||
{{fa-icon "envelope"}}
|
{{fa-icon "envelope"}}
|
||||||
{{i18n user.private_message}}
|
{{i18n user.private_message}}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue