fix: block adding attachment on closed ticket (CTRL + V)

This commit is contained in:
canove
2020-10-07 06:45:48 -03:00
parent 34d0280fef
commit 6cd215dc63
2 changed files with 11 additions and 9 deletions

View File

@@ -328,7 +328,9 @@ const MessageInput = ({ ticketStatus }) => {
value={inputMessage}
onChange={handleChangeInput}
disabled={recording || loading || ticketStatus !== "open"}
onPaste={handleInputPaste}
onPaste={e => {
ticketStatus === "open" && handleInputPaste();
}}
onKeyPress={e => {
if (loading || e.shiftKey) return;
else if (e.key === "Enter") {