Add char limit to chat

This commit is contained in:
cuom1999 2022-05-12 00:01:47 -05:00
parent b1f91d432c
commit efee4ad081
2 changed files with 3 additions and 1 deletions

View file

@ -120,6 +120,8 @@ def post_message(request):
ret = {'msg': 'posted'}
if request.method != 'POST':
return HttpResponseBadRequest()
if len(request.POST['body']) > 5000:
return HttpResponseBadRequest()
room = None
if request.POST['room']: