never send through whispers

never send through whispers

From 6c5064ac0a54da5ac8b61f210e29fac6a5112465 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Tue, 20 Nov 2018 18:15:09 +1100
Subject: [PATCH] never send through whispers


diff --git a/plugin.rb b/plugin.rb
index 68f46ae..9b19db5 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -308,7 +308,7 @@ after_initialize do
   ensure_category("followup")
 
   on(:post_process_cooked) do |doc, post|
-    if post.post_number > 1 && post.raw.present? && (topic = post.topic) && (hash = topic.custom_fields[DiscourseCodeReview::CommitHash])
+    if post.post_number > 1 && !post.whisper? && post.raw.present? && (topic = post.topic) && (hash = topic.custom_fields[DiscourseCodeReview::CommitHash])
 
       if !post.custom_fields[DiscourseCodeReview::GithubId] && post.user
         if token = post.user.custom_fields[DiscourseCodeReview::UserToken]

GitHub

1 Like