From 0e774db5a036aa2e71d3d77f101d9679b0e3a5c5 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 16 Jun 2015 17:34:47 +0930 Subject: [PATCH] Don't show the reply button if the user can't reply --- extensions/mentions/js/src/post-reply-action.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/mentions/js/src/post-reply-action.js b/extensions/mentions/js/src/post-reply-action.js index 5edef4b61..14f196ab3 100644 --- a/extensions/mentions/js/src/post-reply-action.js +++ b/extensions/mentions/js/src/post-reply-action.js @@ -5,7 +5,7 @@ import CommentPost from 'flarum/components/comment-post'; export default function() { extend(CommentPost.prototype, 'actionItems', function(items) { var post = this.props.post; - if (post.isHidden()) return; + if (post.isHidden() || (app.session.user() && !post.discussion().canReply())) return; function insertMention(component, quote) { var mention = '@'+post.user().username()+'#'+post.number()+' ';