Unverified Commit 45b02572 authored by Renato Becker's avatar Renato Becker Committed by GitHub

[FIX] Handling server errors (#162)

* Changed the logic to display the department field on registration form.

* After testing the new Livechat client in production environment, a few issues were detected and fixed.
parent d9cf3126
No preview for this file type
......@@ -26,8 +26,8 @@ export const Messages = memo(({
<Message
el="li"
key={message._id}
me={uid && uid === message.u._id}
group={nextMessage && message.u._id === nextMessage.u._id}
me={uid && message.u && uid === message.u._id}
group={nextMessage && message.u && nextMessage.u && message.u._id === nextMessage.u._id}
avatarResolver={avatarResolver}
attachmentsUrl={getAttachmentsUrl(message.attachments)}
conversationFinishedMessage={conversationFinishedMessage}
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "E-mail",
"enable_notifications_a3daf4b1": "Habilitar notificações",
"error_starting_a_new_conversation_reason_a1b491a1": "Erro ao iniciar nova conversa: %{reason}",
"expand_chat_a0045dbd": "Expandir chat",
"file_exceeds_allowed_size_of_size_bd65c389": "Arquivo excede o tamanho permitido de %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -23,6 +23,7 @@
"drop_here_to_upload_a_file_e5f4dd60": "Drop here to upload a file",
"email_22a7d52d": "Email",
"enable_notifications_a3daf4b1": "Enable notifications",
"error_starting_a_new_conversation_reason_a1b491a1": "Error starting a new conversation: %{reason}",
"expand_chat_a0045dbd": "Expand chat",
"file_exceeds_allowed_size_of_size_bd65c389": "File exceeds allowed size of %{size}.",
"fileupload_error_9eedee68": "FileUpload Error",
......
......@@ -117,7 +117,7 @@ class Triggers {
await processUnread();
// TODO: Need to think about the implementation below.. Is it possible that when the room is created, the available agent is not the same one that was previously selected?
if (agent._id) {
if (agent && agent._id) {
await store.setState({ agent });
}
......
......@@ -58,17 +58,26 @@ export class ChatContainer extends Component {
}
getRoom = async() => {
const { dispatch, room, showConnecting } = this.props;
const { alerts, dispatch, room, showConnecting } = this.props;
if (room) {
return room;
}
const newRoom = await Livechat.room();
await dispatch({ room: newRoom, messages: [], noMoreMessages: false, connecting: showConnecting });
await initRoom();
return newRoom;
await dispatch({ loading: true });
try {
const newRoom = await Livechat.room();
await dispatch({ room: newRoom, messages: [], noMoreMessages: false, connecting: showConnecting });
await initRoom();
return newRoom;
} catch (error) {
const { data: { error: reason } } = error;
const alert = { id: createToken(), children: I18n.t('Error starting a new conversation: %{reason}', { reason }), error: true, timeout: 10000 };
await dispatch({ loading: false, alerts: insert(alerts, alert) });
throw error;
} finally {
await dispatch({ loading: false });
}
}
handleTop = () => {
......
......@@ -27,7 +27,7 @@ const processMessage = async(message) => {
const doPlaySound = async(message) => {
const { sound, user } = store.state;
if (!sound.enabled || message.u._id === user._id) {
if (!sound.enabled || (user && message.u && message.u._id === user._id)) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment