Skip to content

Commit

Permalink
[FIX] When the message is too long declining to send as an attachment…
Browse files Browse the repository at this point in the history
… does not restore the content into the composer (#16332)

Co-authored-by: Danish <danish@kitchen.mshome.net>
Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
  • Loading branch information
4 people authored Jun 4, 2020
1 parent 02645e4 commit 46856e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/ui-utils/client/lib/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ const createModal = (config = {}, fn, onCancel) => {
},

close: () => {
if (onCancel) {
onCancel.call(instance);
}
instance.destroy();
modalStack = modalStack.filter((modal) => modal !== instance);
if (modalStack.length) {
Expand All @@ -89,9 +92,6 @@ const createModal = (config = {}, fn, onCancel) => {
},

cancel: () => {
if (onCancel) {
onCancel.call(instance);
}
instance.close();
},

Expand Down
1 change: 1 addition & 0 deletions app/ui/client/lib/chatMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ export class ChatMessages {
const file = new File([messageBlob], fileName, { type: contentType, lastModified: Date.now() });
fileUpload([{ file, name: fileName }], this.input, { rid, tmid });
} catch (e) {
messageBoxState.set(this.input, msg);
return true;
}
return true;
Expand Down

0 comments on commit 46856e4

Please sign in to comment.