From e4942397dc0a536fcdc08f060977188d1376268b Mon Sep 17 00:00:00 2001 From: Nickyux <30734036+nmsturcke@users.noreply.github.com> Date: Wed, 6 Dec 2023 23:18:03 +0100 Subject: [PATCH] MessageClickActions: Ignore Ephemeral & Deleted Messages (#1972) Co-authored-by: V --- src/plugins/messageClickActions/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/messageClickActions/index.ts b/src/plugins/messageClickActions/index.ts index 08cee4c9f..052c33f61 100644 --- a/src/plugins/messageClickActions/index.ts +++ b/src/plugins/messageClickActions/index.ts @@ -72,6 +72,7 @@ export default definePlugin({ if (event.detail < 2) return; if (settings.store.requireModifier && !event.ctrlKey && !event.shiftKey) return; if (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return; + if (msg.deleted === true) return; if (isMe) { if (!settings.store.enableDoubleClickToEdit || EditStore.isEditing(channel.id, msg.id)) return; @@ -81,6 +82,9 @@ export default definePlugin({ } else { if (!settings.store.enableDoubleClickToReply) return; + const EPHEMERAL = 64; + if (msg.hasFlag(EPHEMERAL)) return; + FluxDispatcher.dispatch({ type: "CREATE_PENDING_REPLY", channel,