FEATURE: displays login modal if user is not connected

FEATURE: displays login modal if user is not connected

diff --git a/javascripts/discourse/initializers/init-discourse-reply-template-component.js.es6 b/javascripts/discourse/initializers/init-discourse-reply-template-component.js.es6
index de76ff9..41f3e20 100644
--- a/javascripts/discourse/initializers/init-discourse-reply-template-component.js.es6
+++ b/javascripts/discourse/initializers/init-discourse-reply-template-component.js.es6
@@ -1,3 +1,4 @@
+import showModal from "discourse/lib/show-modal";
 import { escape } from "pretty-text/sanitizer";
 import { htmlSafe } from "@ember/template";
 import { emojiUnescape } from "discourse/lib/text";
@@ -90,6 +91,12 @@ function _reply(dataset, post, controllerOptions) {
 }
 
 function openComposerWithTemplateAndAction(controller, post, wrap) {
+  const currentUser = getOwner(this).lookup("current-user:main");
+  if (!currentUser) {
+    showModal("login");
+    return;
+  }
+
   const dataset = wrap.dataset;
 
   return ajax(`/posts/${post.id}`, {

GitHub sha: 43a7e980