From 7e3215a873d8f39f5bed7188a1f59ed8d8d0016e Mon Sep 17 00:00:00 2001 From: jeevan6996 Date: Sat, 18 Jul 2026 20:13:05 +0100 Subject: [PATCH] fix: include creator in bounty notifications --- src/reputation/tasks.py | 2 ++ src/researchhub_comment/tests/test_comments.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/reputation/tasks.py b/src/reputation/tasks.py index 16310cf649..031b3b8144 100644 --- a/src/reputation/tasks.py +++ b/src/reputation/tasks.py @@ -443,6 +443,7 @@ def find_qualified_users_and_notify( notification_type=Notification.BOUNTY_FOR_YOU, extra={ "bounty_id": bounty.id, + "bounty_creator_id": bounty.created_by_id, "amount": bounty.amount, "bounty_type": bounty.bounty_type, "bounty_expiration_date": bounty.expiration_date, @@ -479,6 +480,7 @@ def find_bounties_for_user_and_notify(user_id) -> Notification | None: notification_type=Notification.BOUNTY_FOR_YOU, extra={ "bounty_id": bounty.id, + "bounty_creator_id": bounty.created_by_id, "amount": bounty.amount, "bounty_type": bounty.bounty_type, "bounty_expiration_date": bounty.expiration_date, diff --git a/src/researchhub_comment/tests/test_comments.py b/src/researchhub_comment/tests/test_comments.py index 3a6f356dbf..ff9f938709 100644 --- a/src/researchhub_comment/tests/test_comments.py +++ b/src/researchhub_comment/tests/test_comments.py @@ -394,6 +394,9 @@ def test_notify_qualified_users_about_bounty(self): ).last() self.assertEqual(notification.notification_type, Notification.BOUNTY_FOR_YOU) + self.assertEqual( + notification.extra["bounty_creator_id"], str(self.foundation.id) + ) def test_do_not_notify_unqualified_users_about_bounty(self):