From 81a191cae4ce62edf6fb59b24f6672032b50b7e1 Mon Sep 17 00:00:00 2001 From: Manti <67705577+mantikafasi@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:58:44 +0300 Subject: [PATCH] make it ignore current user --- src/plugins/Timezones/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/Timezones/index.tsx b/src/plugins/Timezones/index.tsx index 0b9e06561..f55249062 100644 --- a/src/plugins/Timezones/index.tsx +++ b/src/plugins/Timezones/index.tsx @@ -22,7 +22,7 @@ import { Devs } from "@utils/constants"; import { classes } from "@utils/misc"; import definePlugin, { OptionType } from "@utils/types"; import { findByPropsLazy } from "@webpack"; -import { React } from "@webpack/common"; +import { React, UserStore } from "@webpack/common"; import { Message, User } from "discord-types/general"; import { getTimeString, getUserTimezone } from "./Utils"; @@ -130,12 +130,12 @@ export default definePlugin({ getProfileTimezonesComponent: (e: any) => { - if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile) { + const user = e.user as User; + + if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile || user.id === UserStore.getCurrentUser().id) { return null; } - const user = e.user as User; - const [timezone, setTimezone] = React.useState(null); React.useEffect(() => { @@ -158,7 +158,7 @@ export default definePlugin({ } , getTimezonesComponent: (e: any) => { - if (Vencord.Settings.plugins.showTimezonesInChat || e.user) + if (Vencord.Settings.plugins.showTimezonesInChat || e.user || e.message.author.id === UserStore.getCurrentUser().id) return null; const message = e.message as Message;