Add char limit to chat
This commit is contained in:
parent
b1f91d432c
commit
efee4ad081
2 changed files with 3 additions and 1 deletions
|
@ -120,6 +120,8 @@ def post_message(request):
|
||||||
ret = {'msg': 'posted'}
|
ret = {'msg': 'posted'}
|
||||||
if request.method != 'POST':
|
if request.method != 'POST':
|
||||||
return HttpResponseBadRequest()
|
return HttpResponseBadRequest()
|
||||||
|
if len(request.POST['body']) > 5000:
|
||||||
|
return HttpResponseBadRequest()
|
||||||
|
|
||||||
room = None
|
room = None
|
||||||
if request.POST['room']:
|
if request.POST['room']:
|
||||||
|
|
|
@ -614,7 +614,7 @@ let META_HEADER = [
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 15%">
|
<div style="height: 15%">
|
||||||
<a id="emoji-button" href="#" title="{{_('Emoji')}}"><i class="icofont-slightly-smile"></i></a>
|
<a id="emoji-button" href="#" title="{{_('Emoji')}}"><i class="icofont-slightly-smile"></i></a>
|
||||||
<textarea id="chat-input" placeholder="{{_('Enter your message')}}"></textarea>
|
<textarea maxlength="5000" id="chat-input" placeholder="{{_('Enter your message')}}"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="tooltip" role="tooltip">
|
<div class="tooltip" role="tooltip">
|
||||||
<emoji-picker></emoji-picker>
|
<emoji-picker></emoji-picker>
|
||||||
|
|
Loading…
Reference in a new issue