Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] When the message is too long declining to send as an attachment does not restore the content into the composer #16332

Merged
merged 13 commits into from
Jun 4, 2020
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