From 12936455b03b9fa0cd3f7f8e7c3dde6ef5967aca Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sun, 27 Aug 2017 21:48:45 +0000 Subject: [PATCH] Experiment, lower messaging post rate to 5 secs --- webapp/titanembeds/blueprints/api/api.py | 2 +- webapp/titanembeds/static/js/embed.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/titanembeds/blueprints/api/api.py b/webapp/titanembeds/blueprints/api/api.py index f28d4e1..177640f 100644 --- a/webapp/titanembeds/blueprints/api/api.py +++ b/webapp/titanembeds/blueprints/api/api.py @@ -209,7 +209,7 @@ def fetch_visitor(): @api.route("/post", methods=["POST"]) @valid_session_required(api=True) -@rate_limiter.limit("1 per 10 second", key_func = channel_ratelimit_key) +@rate_limiter.limit("1 per 5 second", key_func = channel_ratelimit_key) def post(): guild_id = request.form.get("guild_id") channel_id = request.form.get('channel_id') diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index 0b6934c..4ae3436 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -896,7 +896,7 @@ }); funct.catch(function(data) { if (data.status == 429) { - Materialize.toast('You are sending messages too fast! 1 message per 10 seconds', 10000); + Materialize.toast('You are sending messages too fast! 1 message per 5 seconds', 10000); } }); funct.always(function() {