From 7a38360fbd97a622d153c7a538657d9a5116af81 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 27 Mar 2015 11:50:09 -0400 Subject: [PATCH] FIX: Quote widget vanished on Messages --- .../javascripts/discourse/controllers/quote-button.js.es6 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/quote-button.js.es6 b/app/assets/javascripts/discourse/controllers/quote-button.js.es6 index fc4c759c0f9..d3b984e9131 100644 --- a/app/assets/javascripts/discourse/controllers/quote-button.js.es6 +++ b/app/assets/javascripts/discourse/controllers/quote-button.js.es6 @@ -19,8 +19,11 @@ export default DiscourseController.extend({ // anonymous users cannot "quote-reply" if (!this.currentUser) return; - // don't display the "quote-reply" button if we can't at least reply as a new topic - if (!this.get('controllers.topic.model.details.can_reply_as_new_topic')) return; + // don't display the "quote-reply" button if we can't reply + const topicDetails = this.get('controllers.topic.model.details'); + if (!(topicDetails.get('can_reply_as_new_topic') || topicDetails.get('can_create_post'))) { + return; + } const selection = window.getSelection(); // no selections