From c123f904441edb1c86e01d42a6815b3634044c29 Mon Sep 17 00:00:00 2001
From: Caetan Tojeiro Carpente <caetan.tojeiro.carpente@cern.ch>
Date: Thu, 18 Aug 2022 14:42:11 +0200
Subject: [PATCH] [HOTFIX] Hide channel category on emails

---
 notifications_consumer/email_templates/base_email.html | 2 +-
 notifications_consumer/processors/email/processor.py   | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/notifications_consumer/email_templates/base_email.html b/notifications_consumer/email_templates/base_email.html
index fec74f0..c47b8f5 100644
--- a/notifications_consumer/email_templates/base_email.html
+++ b/notifications_consumer/email_templates/base_email.html
@@ -74,4 +74,4 @@
       </td>
     </tr>
   </table>
-</body>
\ No newline at end of file
+</body>
diff --git a/notifications_consumer/processors/email/processor.py b/notifications_consumer/processors/email/processor.py
index 0da99e7..c42c35c 100644
--- a/notifications_consumer/processors/email/processor.py
+++ b/notifications_consumer/processors/email/processor.py
@@ -30,6 +30,9 @@ class EmailProcessor(Processor):
         """Process the message and send an email."""
         logging.debug("%s - status:running - kwargs:%r", self, kwargs)
 
+        # Revert this change after discussion
+        disabled_category = True
+
         recipient_email = kwargs["email"]
         if Config.ENV == ENV_DEV:
             email_whitelist = get_email_whitelist(Config.EMAIL_WHITELIST_GROUP_ID)
@@ -52,7 +55,7 @@ class EmailProcessor(Processor):
 
         subject = f'[{kwargs["channel_name"]}] {kwargs["summary"]}'
 
-        category_name = kwargs.get("category_name")
+        category_name = kwargs.get("category_name") if not disabled_category else None
         service_name = f"{category_name} Notifications" if category_name else Config.SERVICE_NAME
 
         context = {
-- 
GitLab