FIX: creating new message via link was failing for anon user
This commit is contained in:
parent
3b083ca0bd
commit
65e80aba03
|
@ -4,10 +4,11 @@ import Group from 'discourse/models/group';
|
||||||
export default Discourse.Route.extend({
|
export default Discourse.Route.extend({
|
||||||
|
|
||||||
beforeModel(transition) {
|
beforeModel(transition) {
|
||||||
|
const self = this;
|
||||||
const params = transition.queryParams;
|
const params = transition.queryParams;
|
||||||
|
|
||||||
if (this.currentUser) {
|
if (self.currentUser) {
|
||||||
this.replaceWith("discovery.latest").then(e => {
|
self.replaceWith("discovery.latest").then(e => {
|
||||||
if (params.username) {
|
if (params.username) {
|
||||||
// send a message to a user
|
// send a message to a user
|
||||||
User.findByUsername(params.username).then(user => {
|
User.findByUsername(params.username).then(user => {
|
||||||
|
|
Loading…
Reference in New Issue