@poolse/react-ui 2.0.11 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -733,15 +733,15 @@ var MessageComposer = forwardRef(
|
|
|
733
733
|
const ready = queue.filter((it) => it.status === "ready");
|
|
734
734
|
const hasReady = ready.length > 0;
|
|
735
735
|
if (!trimmed && !hasReady || sending || uploading) return;
|
|
736
|
+
const opts = {
|
|
737
|
+
...replyingTo ? { quoted_message_id: replyingTo.id } : {},
|
|
738
|
+
...hasReady ? { attachment_ids: ready.map((it) => it.attachment.id) } : {}
|
|
739
|
+
};
|
|
740
|
+
setValue("");
|
|
741
|
+
for (const it of ready) removeUpload(it.localId);
|
|
736
742
|
setSending(true);
|
|
737
743
|
try {
|
|
738
|
-
const opts = {
|
|
739
|
-
...replyingTo ? { quoted_message_id: replyingTo.id } : {},
|
|
740
|
-
...hasReady ? { attachment_ids: ready.map((it) => it.attachment.id) } : {}
|
|
741
|
-
};
|
|
742
744
|
await onSend(trimmed, Object.keys(opts).length > 0 ? opts : void 0);
|
|
743
|
-
setValue("");
|
|
744
|
-
for (const it of ready) removeUpload(it.localId);
|
|
745
745
|
} finally {
|
|
746
746
|
setSending(false);
|
|
747
747
|
}
|