diff --git a/src/app/features/room/RoomInput.tsx b/src/app/features/room/RoomInput.tsx index c6764e04..f109fc06 100644 --- a/src/app/features/room/RoomInput.tsx +++ b/src/app/features/room/RoomInput.tsx @@ -728,6 +728,8 @@ export const RoomInput = forwardRef( // check if its a pk command if (pkCompatEnable && PKitCommandMessageHandler.isPKCommand(plainText)) { pluralkitCmdMessageHandler.handleMessage(plainText); + resetEditor(editor); // clear the editor + return; // don't do anything besides handling the command } if (commandName) { diff --git a/src/app/plugins/pluralkit-handler/PKitProxyMessageHandler.ts b/src/app/plugins/pluralkit-handler/PKitProxyMessageHandler.ts index d51b674e..ad10ee3e 100644 --- a/src/app/plugins/pluralkit-handler/PKitProxyMessageHandler.ts +++ b/src/app/plugins/pluralkit-handler/PKitProxyMessageHandler.ts @@ -79,6 +79,13 @@ export class PKitProxyMessageHandler { return getPerMessageProfileById(this.mx, profileId); } + /** + * this runs synchronously, so it needs to be inited beforehand + * + * @param {string} message the message you want to extract from + * @return {*} {(string | undefined)} the message without the proxy + * @memberof PKitProxyMessageHandler + */ public stripProxyFromMessage(message: string): string | undefined { if (!this.succInit) throw new Error('PK proxy message handler is not initialized'); let m;