From c06cc6e08cae784f79b641c10fa77ac92c6ea11e Mon Sep 17 00:00:00 2001 From: Dan Mihaila Date: Thu, 10 Oct 2024 14:42:51 +0300 Subject: [PATCH] HDX-10153 - add unsubscribe notification key to novu --- processing/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/processing/main.py b/processing/main.py index dc37761..9e5ae0c 100644 --- a/processing/main.py +++ b/processing/main.py @@ -12,9 +12,11 @@ def process(dataset_id_list: Set[str], event: Dict): # comment this line if you need to test local (without matching the dataset id to the list if event and 'dataset_id' in event and event.get('dataset_id') in dataset_id_list: change_summary = get_change_summary(event) + _dataset_id = event.get('dataset_id').replace('-', '_') data_dict = { 'event': event, - 'change_summary': change_summary + 'change_summary': change_summary, + 'unsubscribe_token_key': f'unsubscribe_token_{_dataset_id}' } push_notification_to_novu(data_dict)