diff options
author | Vendicated <vendicated@riseup.net> | 2023-04-18 23:12:58 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-04-18 23:13:10 +0200 |
commit | 8dd70f5d1a5f0aee836d5633d504b75b6513bcc3 (patch) | |
tree | adf91fbf4d6cd56e3a4d8900ed6aa0bafa54f0f7 /src/plugins/gifPaste.ts | |
parent | 8be6c6e3ceed26c5a4524784339c66d49cb1b278 (diff) | |
download | Vencord-8dd70f5d1a5f0aee836d5633d504b75b6513bcc3.tar.gz Vencord-8dd70f5d1a5f0aee836d5633d504b75b6513bcc3.tar.bz2 Vencord-8dd70f5d1a5f0aee836d5633d504b75b6513bcc3.zip |
Fix inserting text when markdown preview is off
Diffstat (limited to 'src/plugins/gifPaste.ts')
-rw-r--r-- | src/plugins/gifPaste.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/gifPaste.ts b/src/plugins/gifPaste.ts index fa64f30..f1dfb2f 100644 --- a/src/plugins/gifPaste.ts +++ b/src/plugins/gifPaste.ts @@ -17,9 +17,9 @@ */ import { Devs } from "@utils/constants"; +import { insertTextIntoChatInputBox } from "@utils/discord"; import definePlugin from "@utils/types"; import { filters, mapMangledModuleLazy } from "@webpack"; -import { ComponentDispatch } from "@webpack/common"; const ExpressionPickerState = mapMangledModuleLazy('name:"expression-picker-last-active-view"', { close: filters.byCode("activeView:null", "setState") @@ -40,7 +40,7 @@ export default definePlugin({ handleSelect(gif?: { url: string; }) { if (gif) { - ComponentDispatch.dispatchToLastSubscribed("INSERT_TEXT", { rawText: gif.url + " " }); + insertTextIntoChatInputBox(gif.url + " "); ExpressionPickerState.close(); } } |