From a8109fbfce5e6a5e9a68c4d77cded1146eec1362 Mon Sep 17 00:00:00 2001 From: oma <57739965+Eazvy@users.noreply.github.com> Date: Mon, 23 Feb 2026 11:04:19 -0500 Subject: [PATCH] ignoreCalls fix Ignore Button (#824) * ignoreCalls fix Button * fix(ignoreCalls): include ongoingRings in ignore dispatch * Update index.tsx * nvm * fix(ignoreCalls): use object default for ongoingRings * Update index.tsx * Update index.tsx * Update index.tsx --------- Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com> --- src/equicordplugins/ignoreCalls/index.tsx | 27 ++++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/equicordplugins/ignoreCalls/index.tsx b/src/equicordplugins/ignoreCalls/index.tsx index b9e287be3..1df54d557 100644 --- a/src/equicordplugins/ignoreCalls/index.tsx +++ b/src/equicordplugins/ignoreCalls/index.tsx @@ -17,6 +17,20 @@ import { Channel } from "@vencord/discord-types"; import { findComponentByCodeLazy } from "@webpack"; import { FluxDispatcher, Menu, React, Tooltip, UserStore } from "@webpack/common"; +interface CallUpdate { + ringing: string[]; + ongoingRings: Record; + messageId: string; + region: string; +} + +const args: CallUpdate = { + ringing: [], + ongoingRings: {}, + messageId: "", + region: "", +}; + const ignoredChannelIds = new Set(); const cl = classNameFactory("vc-ignore-calls-"); const Deafen = findComponentByCodeLazy("0-1.02-.1H3.05a9"); @@ -74,12 +88,6 @@ const settings = definePluginSettings({ }, }); -const args = { - ringing: [], - messageId: "", - region: "", -}; - export default definePlugin({ name: "IgnoreCalls", description: "Allows you to ignore calls from specific users or dm groups.", @@ -99,8 +107,9 @@ export default definePlugin({ "gdm-context": ContextMenuPatch, }, flux: { - async CALL_UPDATE({ ringing, messageId, region }) { - args.ringing = ringing; + async CALL_UPDATE({ ringing, ongoingRings, messageId, region }) { + args.ringing = ringing || []; + args.ongoingRings = ongoingRings || {}; args.messageId = messageId; args.region = region; } @@ -113,6 +122,7 @@ export default definePlugin({ type: "CALL_UPDATE", channelId: channel.id, ringing: args.ringing.filter((id: string) => id !== currentUserId), + ongoingRings: args.ongoingRings, messageId: args.messageId, region: args.region }); @@ -133,6 +143,7 @@ export default definePlugin({ type: "CALL_UPDATE", channelId: channel.id, ringing: args.ringing.filter((id: string) => id !== currentUserId), + ongoingRings: args.ongoingRings, messageId: args.messageId, region: args.region });