diff --git a/app/assets/javascripts/discourse/controllers/user_activity_controller.js b/app/assets/javascripts/discourse/controllers/user_activity_controller.js index a1e49b082..0d37c446a 100644 --- a/app/assets/javascripts/discourse/controllers/user_activity_controller.js +++ b/app/assets/javascripts/discourse/controllers/user_activity_controller.js @@ -20,16 +20,18 @@ Discourse.UserActivityRoute = Discourse.Route.extend({ var composerController = this.controllerFor('composer'); controller.set('model', user); - Discourse.Draft.get('new_private_message').then(function(data) { - if (data.draft) { - composerController.open({ - draft: data.draft, - draftKey: 'new_private_message', - ignoreIfChanged: true, - draftSequence: data.draft_sequence - }); - } - }); + if (Discourse.User.current()) { + Discourse.Draft.get('new_private_message').then(function(data) { + if (data.draft) { + composerController.open({ + draft: data.draft, + draftKey: 'new_private_message', + ignoreIfChanged: true, + draftSequence: data.draft_sequence + }); + } + }); + } } }); diff --git a/app/assets/javascripts/discourse/templates/user/stream.js.handlebars b/app/assets/javascripts/discourse/templates/user/stream.js.handlebars index 9a3e639b4..ef49ca4ad 100644 --- a/app/assets/javascripts/discourse/templates/user/stream.js.handlebars +++ b/app/assets/javascripts/discourse/templates/user/stream.js.handlebars @@ -1,6 +1,6 @@
{{#each view.stream.content}} -