QuickReply/MessageClickActions: ignore non-replyable & ephemeral messages (#3692)

Co-authored-by: YashRaj <91825864+YashRajCodes@users.noreply.github.com>
This commit is contained in:
V 2025-09-28 23:18:23 +02:00 committed by GitHub
parent 631c763fc4
commit f040133412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 607 additions and 10 deletions

View file

@ -20,7 +20,8 @@ import { definePluginSettings } from "@api/Settings";
import { Devs, IS_MAC } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { Message } from "@vencord/discord-types";
import { ChannelStore, ComponentDispatch, FluxDispatcher as Dispatcher, MessageActions, MessageStore, PermissionsBits, PermissionStore, SelectedChannelStore, UserStore } from "@webpack/common";
import { MessageFlags } from "@vencord/discord-types/enums";
import { ChannelStore, ComponentDispatch, FluxDispatcher as Dispatcher, MessageActions, MessageStore, MessageTypeSets, PermissionsBits, PermissionStore, SelectedChannelStore, UserStore } from "@webpack/common";
import NoBlockedMessagesPlugin from "plugins/noBlockedMessages";
import NoReplyMentionPlugin from "plugins/noReplyMention";
@ -134,6 +135,7 @@ function getNextMessage(isUp: boolean, isReply: boolean) {
if (m.deleted) return false;
if (!isReply && m.author.id !== meId) return false; // editing only own messages
if (hasNoBlockedMessages && NoBlockedMessagesPlugin.shouldIgnoreMessage(m)) return false;
if (!MessageTypeSets.REPLYABLE.has(m.type) || m.hasFlag(MessageFlags.EPHEMERAL)) return false;
return true;
});