mirror of
https://github.com/FAUSheppy/tmnf-replay-server.git
synced 2025-12-06 15:11:36 +01:00
fix: cleanup message & fix user query
This commit is contained in:
@@ -10,12 +10,13 @@ def send_notification(app, target_user, mapname, old_replay, new_replay):
|
||||
return
|
||||
|
||||
# send to event dispatcher #
|
||||
message = "Trackmania: Record broken on {}".format(mapname)
|
||||
message += "Old time: {}".format(old_replay.get_human_readable_time())
|
||||
message += "New time: {}".format(new_replay.get_human_readable_time())
|
||||
message += "by {}".format(new_replay.clean_login())
|
||||
message = "TM: Record broken on {}\n\n".format(mapname)
|
||||
message += "Old time: {}\n".format(old_replay.get_human_readable_time())
|
||||
message += "New time: {}\n".format(new_replay.get_human_readable_time())
|
||||
message += "\nby {}".format(new_replay.clean_login())
|
||||
|
||||
payload = { "users": [target_user], "msg" : message }
|
||||
|
||||
payload = { "users": [user], "msg" : message }
|
||||
|
||||
r = requests.post(app.config["DISPATCH_SERVER"] + "/smart-send",
|
||||
json=payload, auth=app.config["DISPATCH_AUTH"])
|
||||
|
||||
Reference in New Issue
Block a user