115: Add cap on number of mentions
This caps the number of mentions in a submission or comment to MENTION_LIMIT, which is set to 100 by default. When limit is exceeded, returns a helpful message to the user.
This commit is contained in:
parent
416294b112
commit
4e8fef2ef0
3 changed files with 10 additions and 0 deletions
|
@ -60,6 +60,7 @@ app.config['MAIL_PASSWORD'] = environ.get("MAIL_PASSWORD", "").strip()
|
|||
app.config['DESCRIPTION'] = environ.get("DESCRIPTION", "DESCRIPTION GOES HERE").strip()
|
||||
app.config['SETTINGS'] = {}
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = app.config['DATABASE_URL']
|
||||
app.config['MENTION_LIMIT'] = int(environ.get('MENTION_LIMIT', 100))
|
||||
|
||||
r=redis.Redis(host=environ.get("REDIS_URL", "redis://localhost"), decode_responses=True, ssl_cert_reqs=None)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue