even more plugin fixes

This commit is contained in:
Vendicated 2022-11-11 18:49:47 +01:00
parent 2133823bd3
commit dddb28192c
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3
2 changed files with 4 additions and 0 deletions

View file

@ -23,6 +23,8 @@ import { fetchPronouns, formatPronouns } from "../pronoundbUtils";
import { PronounMapping, UserProfilePronounsProps, UserProfileProps } from "../types"; import { PronounMapping, UserProfilePronounsProps, UserProfileProps } from "../types";
export default function PronounsProfileWrapper(PronounsComponent: React.ElementType<UserProfilePronounsProps>, props: UserProfilePronounsProps, profileProps: UserProfileProps) { export default function PronounsProfileWrapper(PronounsComponent: React.ElementType<UserProfilePronounsProps>, props: UserProfilePronounsProps, profileProps: UserProfileProps) {
if (!profileProps) return null;
const user = UserStore.getUser(profileProps.userId) ?? {}; const user = UserStore.getUser(profileProps.userId) ?? {};
// Don't bother fetching bot or system users // Don't bother fetching bot or system users
if (user.bot || user.system) return null; if (user.bot || user.system) return null;

View file

@ -36,6 +36,8 @@ export default definePlugin({
authors: [Devs.Ven], authors: [Devs.Ven],
description: "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.", description: "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.",
dependencies: ["MenuItemDeobfuscatorApi"],
openImage(url: string) { openImage(url: string) {
const u = new URL(url); const u = new URL(url);
u.searchParams.set("size", "512"); u.searchParams.set("size", "512");