diff options
author | Manti <67705577+mantikafasi@users.noreply.github.com> | 2023-04-30 01:53:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-30 00:53:37 +0200 |
commit | 043381963bf7c3899c3224c05c18ff8542773a3e (patch) | |
tree | 131052dbf7a37648a3d3bc331825458a04a8f017 /src/plugins/reviewDB/Utils/Utils.tsx | |
parent | 5b485806eaf5cdf893746ff85f495aad2427b986 (diff) | |
download | Vencord-043381963bf7c3899c3224c05c18ff8542773a3e.tar.gz Vencord-043381963bf7c3899c3224c05c18ff8542773a3e.tar.bz2 Vencord-043381963bf7c3899c3224c05c18ff8542773a3e.zip |
ReviewDB: make warning review disableable; add timestamps (#948)
Diffstat (limited to 'src/plugins/reviewDB/Utils/Utils.tsx')
-rw-r--r-- | src/plugins/reviewDB/Utils/Utils.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/reviewDB/Utils/Utils.tsx b/src/plugins/reviewDB/Utils/Utils.tsx index b3cb6cd..7fb907b 100644 --- a/src/plugins/reviewDB/Utils/Utils.tsx +++ b/src/plugins/reviewDB/Utils/Utils.tsx @@ -17,13 +17,13 @@ */ import { Settings } from "@api/settings"; -import { Devs } from "@utils/constants"; import Logger from "@utils/Logger"; import { openModal } from "@utils/modal"; import { findByProps } from "@webpack"; import { FluxDispatcher, React, SelectedChannelStore, Toasts, UserUtils } from "@webpack/common"; import { Review } from "../entities/Review"; +import { UserType } from "../entities/User"; export async function openUserProfileModal(userId: string) { await UserUtils.fetchUser(userId); @@ -86,10 +86,5 @@ export function showToast(text: string) { export const sleep = (ms: number) => new Promise(r => setTimeout(r, ms)); export function canDeleteReview(review: Review, userId: string) { - if (review.sender.discordID === userId) return true; - - const myId = BigInt(userId); - return myId === Devs.mantikafasi.id || - myId === Devs.Ven.id || - myId === Devs.rushii.id; + if (review.sender.discordID === userId || Settings.plugins.ReviewDB.userType === UserType.Admin) return true; } |