aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/invisibleChat/components/EncryptionModal.tsx
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-04-18 23:12:58 +0200
committerVendicated <vendicated@riseup.net>2023-04-18 23:13:10 +0200
commit8dd70f5d1a5f0aee836d5633d504b75b6513bcc3 (patch)
treeadf91fbf4d6cd56e3a4d8900ed6aa0bafa54f0f7 /src/plugins/invisibleChat/components/EncryptionModal.tsx
parent8be6c6e3ceed26c5a4524784339c66d49cb1b278 (diff)
downloadVencord-8dd70f5d1a5f0aee836d5633d504b75b6513bcc3.tar.gz
Vencord-8dd70f5d1a5f0aee836d5633d504b75b6513bcc3.tar.bz2
Vencord-8dd70f5d1a5f0aee836d5633d504b75b6513bcc3.zip
Fix inserting text when markdown preview is off
Diffstat (limited to 'src/plugins/invisibleChat/components/EncryptionModal.tsx')
-rw-r--r--src/plugins/invisibleChat/components/EncryptionModal.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/invisibleChat/components/EncryptionModal.tsx b/src/plugins/invisibleChat/components/EncryptionModal.tsx
index c4f1f35..570b4c0 100644
--- a/src/plugins/invisibleChat/components/EncryptionModal.tsx
+++ b/src/plugins/invisibleChat/components/EncryptionModal.tsx
@@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+import { insertTextIntoChatInputBox } from "@utils/discord";
import {
ModalContent,
ModalFooter,
@@ -24,7 +25,7 @@ import {
ModalRoot,
openModal,
} from "@utils/modal";
-import { Button, ComponentDispatch, Forms, React, Switch, TextInput } from "@webpack/common";
+import { Button, Forms, React, Switch, TextInput } from "@webpack/common";
import { encrypt } from "../index";
@@ -84,9 +85,7 @@ function EncModal(props: ModalProps) {
const toSend = noCover ? encrypted.replaceAll("d", "") : encrypted;
if (!toSend) return;
- ComponentDispatch.dispatchToLastSubscribed("INSERT_TEXT", {
- rawText: `${toSend}`
- });
+ insertTextIntoChatInputBox(toSend);
props.onClose();
}}