discourse/plugins/chat
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
..
app DEV: Always create chat mention records (#20470) 2023-03-07 19:07:11 +04:00
assets FIX: Uploading multiple files to chat could cause canellations (#20605) 2023-03-09 09:17:54 +01:00
config Update translations (#20559) 2023-03-07 14:58:31 +01:00
db DEV: Always create chat mention records (#20470) 2023-03-07 19:07:11 +04:00
lib DEV: Always create chat mention records (#20470) 2023-03-07 19:07:11 +04:00
public
spec FIX: Uploading multiple files to chat could cause canellations (#20605) 2023-03-09 09:17:54 +01:00
test/javascripts PERF: applies optimisations on chat-live pane (#20532) 2023-03-06 16:42:11 +01:00
plugin.rb DEV: Change Bookmarkable registration to DiscoursePluginRegistry (#20556) 2023-03-08 10:39:12 +10:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.