@poolse/react-native 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 +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1476,14 +1476,17 @@ var MessageComposer = forwardRef(
|
|
|
1476
1476
|
const submitDisabled = disabled || sending || isUploading || value.trim().length === 0 && readyAttachmentIds.length === 0;
|
|
1477
1477
|
const handleSend = async () => {
|
|
1478
1478
|
if (submitDisabled) return;
|
|
1479
|
+
const body = value.trim();
|
|
1480
|
+
const replyId = replyingTo?.id;
|
|
1481
|
+
const attachmentIds = readyAttachmentIds;
|
|
1482
|
+
setValue("");
|
|
1483
|
+
upload.reset();
|
|
1479
1484
|
setSending(true);
|
|
1480
1485
|
try {
|
|
1481
|
-
await onSend(
|
|
1482
|
-
...
|
|
1483
|
-
...
|
|
1486
|
+
await onSend(body, {
|
|
1487
|
+
...replyId ? { quoted_message_id: replyId } : {},
|
|
1488
|
+
...attachmentIds.length > 0 ? { attachment_ids: attachmentIds } : {}
|
|
1484
1489
|
});
|
|
1485
|
-
setValue("");
|
|
1486
|
-
upload.reset();
|
|
1487
1490
|
} finally {
|
|
1488
1491
|
setSending(false);
|
|
1489
1492
|
}
|