Websocket: send form field maxlengths
このコミットが含まれているのは:
コミット
12338747de
|
@ -665,6 +665,11 @@ const on_websocket_message = async (event) => {
|
|||
info_button.dataset.visible = "";
|
||||
}
|
||||
|
||||
// form input maxlengths
|
||||
chat_form_comment.maxLength = receipt.maxlength.comment;
|
||||
chat_appearance_form_name.maxLength = receipt.maxlength.name;
|
||||
chat_appearance_form_password.maxLength = receipt.maxlength.password;
|
||||
|
||||
// chat form nonce
|
||||
chat_form_nonce.value = receipt.nonce;
|
||||
|
||||
|
|
|
@ -36,6 +36,11 @@ async def websocket_outbound(queue, user):
|
|||
'scrollback': CONFIG['MAX_CHAT_SCROLLBACK'],
|
||||
'digest': get_random_captcha_digest_for(user),
|
||||
'pingpong': CONFIG['TASK_BROADCAST_PING'],
|
||||
'maxlength': {
|
||||
'comment': CONFIG['CHAT_COMMENT_MAX_LENGTH'],
|
||||
'name': CONFIG['CHAT_NAME_MAX_LENGTH'],
|
||||
'password': CONFIG['CHAT_TRIPCODE_PASSWORD_MAX_LENGTH'],
|
||||
},
|
||||
})
|
||||
while True:
|
||||
payload = await queue.get()
|
||||
|
|
読み込み中…
新しいイシューから参照