From c1ae991073350d1104966eac65b4fa3e9ec13c27 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:07:26 -0400 Subject: [PATCH] Timezones: Pass UserID to banner --- src/equicordplugins/timezones/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/equicordplugins/timezones/index.tsx b/src/equicordplugins/timezones/index.tsx index 1d97240bc..7d0590544 100644 --- a/src/equicordplugins/timezones/index.tsx +++ b/src/equicordplugins/timezones/index.tsx @@ -279,6 +279,13 @@ export default definePlugin({ patches: [ // stolen from ViewIcons + { + find: 'backgroundColor:"COMPLETE"===', + replacement: { + match: /bannerSrc:\i,(?=backgroundColor:"COMPLETE")/, + replace: "$&user:arguments[0].user," + } + }, { find: '"--custom-cutout-radius":', replacement: { @@ -351,12 +358,9 @@ export default definePlugin({ getTime, renderProfileTimezone: props => { - if (!settings.store.showProfileTime || !props?.bannerSrc) return null; - - const match = /\/banners\/(\d+)\//.exec(props.bannerSrc); - const userId = match?.[1]; - if (!userId) return null; + if (!settings.store.showProfileTime || !props?.user?.id) return null; + const userId = props.user.id; if (userId === UserStore.getCurrentUser().id && !settings.store.showOwnTimezone) return null; return ;