From 33ef6ffbd547f73ef08176a83de515d743c9e19c Mon Sep 17 00:00:00 2001 From: saint Date: Sat, 7 Dec 2024 15:16:53 +1100 Subject: [PATCH] Tackle the root issue with Discourse not playing ball with post min entropy 0 / post unclear issue --- goss-restorethread.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/goss-restorethread.rb b/goss-restorethread.rb index 24f656b..38ef5f0 100644 --- a/goss-restorethread.rb +++ b/goss-restorethread.rb @@ -1047,7 +1047,8 @@ class GossamerForumsImporter < ImportScripts::Base # Remove the [signature] as we don't support this in Discourse # sanitized_message.sub!(/\n?\[signature\]\n?\z/, '') - sanitized_message.gsub(/\n?\[signature\]\n?/, '') +# sanitized_message.gsub(/\n?\[signature\]\n?/, '') + sanitized_message.gsub!(/[\r\n]*\[signature\][\r\n]*/, '') # Ensure minimum length if sanitized_message.strip.empty? || sanitized_message.length < 5