Skip to content

Commit 0751722

Browse files
authored
QuickReply: skip blocked messages if NoBlockedMessages enabled (#2476)
1 parent 44d7081 commit 0751722

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/plugins/quickReply/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { ChannelStore, FluxDispatcher as Dispatcher, MessageStore, PermissionsBi
2424
import { Message } from "discord-types/general";
2525

2626
const Kangaroo = findByPropsLazy("jumpToMessage");
27+
const RelationshipStore = findByPropsLazy("getRelationships", "isBlocked");
2728

2829
const isMac = navigator.platform.includes("Mac"); // bruh
2930
let replyIdx = -1;
@@ -139,6 +140,10 @@ function getNextMessage(isUp: boolean, isReply: boolean) {
139140
messages = messages.filter(m => m.author.id === meId);
140141
}
141142

143+
if (Vencord.Plugins.isPluginEnabled("NoBlockedMessages")) {
144+
messages = messages.filter(m => !RelationshipStore.isBlocked(m.author.id));
145+
}
146+
142147
const mutate = (i: number) => isUp
143148
? Math.min(messages.length - 1, i + 1)
144149
: Math.max(-1, i - 1);

0 commit comments

Comments
 (0)