master
Aevann1 2022-01-17 19:28:28 +02:00
parent 1a2ce45b1f
commit 02250137d3
2 changed files with 5 additions and 0 deletions

View File

@ -476,4 +476,5 @@ def transfers(v):
next_exists = len(comments) > 25
comments = comments[:25]
if request.headers.get("Authorization"): return {"data": [x.json for x in comments]}
return render_template("transfers.html", v=v, page=page, comments=comments, standalone=True, next_exists=next_exists)

View File

@ -279,6 +279,10 @@ def transfer_bux(v, username):
if v.procoins < amount: return {"error": "You don't have enough marseybux"}, 400
if amount < 100: return {"error": "You have to gift at least 100 marseybux."}, 400
if TAX_RECEIVER_ID:
log_message = f"[@{v.username}](/id/{v.id}) has transferred {amount} marseybux to [@{receiver.username}]({receiver.id})"
send_repeatable_notification(TAX_RECEIVER_ID, log_message)
receiver.procoins += amount
v.procoins -= amount
send_repeatable_notification(receiver.id, f"🤑 [@{v.username}](/id/{v.id}) has gifted you {amount} marseybux!")