forked from rDrama/rDrama
1
0
Fork 0

make new users follow carp automatically on rdrama

master
Aevann1 2022-07-10 18:13:16 +02:00
parent fecaed8223
commit d3b15e2b8a
1 changed files with 7 additions and 0 deletions

View File

@ -356,6 +356,13 @@ def sign_up_post(v):
session["lo_user"] = new_user.id
if SITE == 'rdrama.net':
carp = get_user(CARP_ID)
new_follow = Follow(user_id=new_user.id, target_id=carp.id)
g.db.add(new_follow)
carp.stored_subscriber_count += 1
g.db.add(carp)
send_notification(carp.id, f"A new user (@{new_user.username}) has followed you automatically!")
return redirect(SITE_FULL)