discourse/plugins
Martin Brennan ba1b95c9f4
FIX: Uploading multiple files to chat could cause canellations (#20605)
When we introduced `existingUploads` as an arg to the
ChatComposerUploads component, we also introduced a bug where
if multiple uploads were being done at once, and the draft
was saved, then because of didReceiveAttrs we would cancel
the currently uploading files because the draft uploads became
the existingUploads.

To work around this, since we do want to keep this on didReceiveAttrs
for cases when the user opens a draft or edits another message,
the easiest thing to do is to just not save uploads into the chat
draft if there are still uploads in progress. That way only when
all uploads are complete do we make them a part of the draft.

There is a small risk that the user could do something to lose
their uploads in the draft, but it's a better gamble to have
that happen rather than in progress uploads to be cancelled
while the user is waiting for them to be done because of the
draft.

Also changes the uploads system spec back to the old way of
attaching multiple files since that is why it was failing.
2023-03-09 09:17:54 +01:00
..
chat FIX: Uploading multiple files to chat could cause canellations (#20605) 2023-03-09 09:17:54 +01:00
discourse-details Update translations (#20559) 2023-03-07 14:58:31 +01:00
discourse-local-dates DEV: Support @debounce decorator in native class syntax (#20521) 2023-03-03 11:48:58 +00:00
discourse-narrative-bot UX/DEV: Review queue redesign fixes (#20239) 2023-03-02 16:40:53 +01:00
discourse-presence Update translations (#20370) 2023-02-20 11:01:01 +01:00
lazy-yt FIX: lazy_yt_enabled doesn't affect the engine (#19997) 2023-01-25 12:40:57 -03:00
poll Update translations (#19974) 2023-01-24 16:32:34 +01:00
styleguide Update translations (#20389) 2023-02-21 17:12:10 +01:00