From c381466389504eabfbe553d33ea43cd22e6e70a9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 10 Oct 2022 14:13:43 +0200 Subject: [PATCH] tweak asset notifs --- files/routes/asset_submissions.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/files/routes/asset_submissions.py b/files/routes/asset_submissions.py index 915c8f984..26d0ae625 100644 --- a/files/routes/asset_submissions.py +++ b/files/routes/asset_submissions.py @@ -147,10 +147,12 @@ if SITE not in ('pcmemes.net', 'watchpeopledie.co'): author.coins += 250 g.db.add(author) - msg = f"@{v.username} (Admin) has approved a marsey you made: :{marsey.name}:\nYou have received 250 coins as a reward!" - send_repeatable_notification(author.id, msg) - if v.id not in (author.id, marsey.submitter_id): + if v.id != author.id: + msg = f"@{v.username} (Admin) has approved a marsey you made: :{marsey.name}:\nYou have received 250 coins as a reward!" + send_repeatable_notification(author.id, msg) + + if v.id != marsey.submitter_id and author.id != marsey.submitter_id: msg = f"@{v.username} (Admin) has approved a marsey you submitted: :{marsey.name}:" send_repeatable_notification(marsey.submitter_id, msg) @@ -304,8 +306,11 @@ if SITE not in ('pcmemes.net', 'watchpeopledie.co'): g.db.add(hat_copy) + if v.id != author.id: + msg = f"@{v.username} (Admin) has approved a hat you made: '{hat.name}'" + send_repeatable_notification(author.id, msg) - if v.id != hat.submitter_id: + if v.id != hat.submitter_id and author.id != hat.submitter_id: msg = f"@{v.username} (Admin) has approved a hat you submitted: '{hat.name}'" send_repeatable_notification(hat.submitter_id, msg)