aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-11-25 15:41:53 -0800
committerPinapelz <yukais@pinapelz.com>2025-11-25 15:41:57 -0800
commitde4a37b4cdb4cd752c4ce2361912fa2bb84cc766 (patch)
tree2dee39de106c0eabbaaed6fc92b1e537dcafd005
parent66ceebab80557c71434b6da606375403d20b6a34 (diff)
fix: remove archive_hash before checking if notif should be sent
-rw-r--r--generate.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/generate.py b/generate.py
index e500462..ab7d968 100644
--- a/generate.py
+++ b/generate.py
@@ -76,7 +76,11 @@ def attempt_broadcast_notifications(news_data: list, title: str, topic: str, ima
for entry in news_data:
if datetime.fromtimestamp(entry["timestamp"]) < cutoff:
continue
- news_id = compute_json_hash(json.dumps(entry, sort_keys=True))
+ cleaned_entry = entry
+ if "archive_hash" in cleaned_entry:
+ cleaned_entry = entry.copy()
+ del cleaned_entry["archive_hash"]
+ news_id = compute_json_hash(json.dumps(cleaned_entry, sort_keys=True))
if database.check_news_id_exists(news_id):
continue
else:
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage