From 7b8d25dca1cd5d15dde643c34142142ebf1e76e8 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 9 Jun 2026 20:14:49 -0400 Subject: [PATCH] AudioPlayerAPI: Fix Patch & MessagePeek: Fix with pins --- src/equicordplugins/_api/audioPlayer.ts | 2 +- src/equicordplugins/messagePeek/index.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/equicordplugins/_api/audioPlayer.ts b/src/equicordplugins/_api/audioPlayer.ts index 1bba1a0e6..23da4a5c7 100644 --- a/src/equicordplugins/_api/audioPlayer.ts +++ b/src/equicordplugins/_api/audioPlayer.ts @@ -24,7 +24,7 @@ export default definePlugin({ // Uses the audio as-is if external, otherwise checks for an internal Discord sound. // Also force loads the internal sounds module to account for the second patch group below, // as well as accounting for not calling the module in this patch when this.type is not DISCORD. - match: /(let \i=class.{0,900}?new Audio;\i.src=)((\i\(\d+\))(?:\(`\.\/\$\{|.{0,50}concat\())this.name((?:\}\.mp3`|,".mp3"\))\))/, + match: /(let \i=class.{0,1000}?new Audio;\i.src=)((\i\(\d+\))(?:\(`\.\/\$\{|.{0,50}concat\())this.name(\}\.mp3`\))/, replace: "$3;$1this.type!==$self.AudioType.DISCORD?this.audio:$2this.audio$4" }, { diff --git a/src/equicordplugins/messagePeek/index.tsx b/src/equicordplugins/messagePeek/index.tsx index a9360a0ad..7c6b55e9b 100644 --- a/src/equicordplugins/messagePeek/index.tsx +++ b/src/equicordplugins/messagePeek/index.tsx @@ -225,7 +225,9 @@ function Timestamp({ channel }: { channel: Channel; }) { if (!lastMessage) return null; const timestamp = SnowflakeUtils.extractTimestamp(lastMessage.id); - const className = ExperimentStore.getUserExperimentBucket("2026-01-favorites-server") > 0 ? cl("timestamp-favorites") : cl("timestamp"); + const isChannelPinned = UserGuildSettingsStore.isMessagesFavorite(channel?.id); + const isFavoritesEnabled = ExperimentStore.getUserExperimentBucket("2026-01-favorites-server") > 0; + const className = isFavoritesEnabled || isChannelPinned ? cl("timestamp-favorites") : cl("timestamp"); return {formatRelativeTime(timestamp)}; }