From 11a0c293b821e1cc4cfc63e2f8e234bd49f5ef49 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 18 Mar 2016 13:17:37 -0400 Subject: [PATCH] FIX: Solved button was showing up for poster, not topic poster --- .../discourse/initializers/extend-for-solved-button.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 index 3aaf46c..081aaba 100644 --- a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 +++ b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 @@ -115,7 +115,7 @@ function initializeWithApi(api) { const canAccept = attrs.can_accept_answer; const canUnaccept = attrs.can_unaccept_answer; const accepted = attrs.accepted_answer; - const isOp = currentUser && currentUser.id === attrs.user_id; + const isOp = currentUser && currentUser.id === attrs.topicCreatedById; const position = (!accepted && canAccept && !isOp) ? 'second-last-hidden' : 'first'; if (canAccept) {