forked from rDrama/rDrama
1
0
Fork 0

notify ppl when someone joins via their referral link

master
Aevann 2023-09-29 08:05:51 +03:00
parent 48599325e5
commit 805624b3e9
1 changed files with 2 additions and 0 deletions

View File

@ -325,6 +325,8 @@ def sign_up_post(v):
ref_user = get_account(ref_id)
if ref_user:
send_notification(ref_user.id, f"A new user - @{new_user.username} - has signed up via your referral link!")
badge_grant(user=ref_user, badge_id=10)
# off-by-one: newly referred user isn't counted
if ref_user.referral_count >= 9: