feat: #14 allow multiline messages

This commit is contained in:
canove
2020-09-26 15:33:01 -03:00
parent 8f5aab598d
commit 2e9919c621
3 changed files with 5 additions and 1 deletions

View File

@@ -43,6 +43,8 @@ export const store = async (req: Request, res: Response): Promise<Response> => {
const ticket = await ShowTicketService(ticketId);
console.log(body);
let sentMessage: WbotMessage;
if (media) {

View File

@@ -326,7 +326,7 @@ const MessageInput = () => {
disabled={recording || loading}
onPaste={handleInputPaste}
onKeyPress={e => {
if (loading) return;
if (loading || e.shiftKey) return;
else if (e.key === "Enter") {
handleSendMessage();
}

View File

@@ -122,6 +122,7 @@ const useStyles = makeStyles(theme => ({
display: "block",
position: "relative",
whiteSpace: "pre-wrap",
backgroundColor: "#ffffff",
color: "#303030",
alignSelf: "flex-start",
@@ -145,6 +146,7 @@ const useStyles = makeStyles(theme => ({
display: "block",
position: "relative",
whiteSpace: "pre-wrap",
backgroundColor: "#dcf8c6",
color: "#303030",
alignSelf: "flex-end",