diff --git a/files/routes/front.py b/files/routes/front.py index 4d61f9c0ec..c98f72ae70 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -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) \ No newline at end of file diff --git a/files/routes/users.py b/files/routes/users.py index b8580474ea..441ab9a24c 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -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!")