diff --git a/files/helpers/alerts.py b/files/helpers/alerts.py index c23585beb..0282a745c 100644 --- a/files/helpers/alerts.py +++ b/files/helpers/alerts.py @@ -21,7 +21,7 @@ def send_repeatable_notification(uid, text, autojanny=False): if autojanny: author_id = AUTOJANNY_ID else: author_id = NOTIFICATIONS_ID - text_html = sanitize(text, alert=True) + text_html = sanitize(text) existing_comment = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, distinguish_level=6, body_html=text_html, created_utc=0).first() diff --git a/files/routes/users.py b/files/routes/users.py index 595b38d71..b497fb96a 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -248,12 +248,12 @@ def transfer_coins(v, username): else: tax = 0 if TAX_RECEIVER_ID: - log_message = f"[@{v.username}](/id/{v.id}) has transferred {amount} {app.config['COINS_NAME']} to [@{receiver.username}]({receiver.id})" + log_message = f"@{v.username} has transferred {amount} {app.config['COINS_NAME']} to @{receiver.username}" send_repeatable_notification(TAX_RECEIVER_ID, log_message) receiver.coins += amount-tax v.coins -= amount - send_repeatable_notification(receiver.id, f"🤑 [@{v.username}](/id/{v.id}) has gifted you {amount-tax} {app.config['COINS_NAME']}!") + send_repeatable_notification(receiver.id, f":marseycapitalistmanlet: @{v.username} has gifted you {amount-tax} {app.config['COINS_NAME']}!") g.db.add(receiver) g.db.add(v) @@ -280,12 +280,12 @@ def transfer_bux(v, username): 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})" + log_message = f"@{v.username} has transferred {amount} Marseybux to @{receiver.username}" 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!") + send_repeatable_notification(receiver.id, f":marseycapitalistmanlet: @{v.username} has gifted you {amount} marseybux!") g.db.add(receiver) g.db.add(v)