From 1c7a4e4178d9024f9e41f4c999006e042cd55554 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 20 Jan 2017 09:13:58 -0500 Subject: [PATCH] Add accept and unaccept solution events --- plugin.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin.rb b/plugin.rb index bbe479b..c282f10 100644 --- a/plugin.rb +++ b/plugin.rb @@ -53,6 +53,8 @@ after_initialize do ) end + DiscourseEvent.trigger(:accepted_solution, post) + render json: success_json end @@ -79,6 +81,8 @@ after_initialize do notification.destroy if notification + DiscourseEvent.trigger(:unaccepted_solution, post) + render json: success_json end