diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx
index fb431b52b..b2501023e 100644
--- a/src/plugins/friendsSince/index.tsx
+++ b/src/plugins/friendsSince/index.tsx
@@ -7,6 +7,7 @@
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import { getCurrentChannel } from "@utils/discord";
+import { classes } from "@utils/misc";
import definePlugin from "@utils/types";
import { findByPropsLazy } from "@webpack";
import { Heading, React, RelationshipStore, Text } from "@webpack/common";
@@ -22,6 +23,7 @@ export default definePlugin({
description: "Shows when you became friends with someone in the user popout",
authors: [Devs.Elvyra],
patches: [
+ // User popup
{
find: ".AnalyticsSections.USER_PROFILE}",
replacement: {
@@ -29,16 +31,25 @@ export default definePlugin({
replace: "$&,$self.friendsSince({ userId: $1 })"
}
},
+ // User DMs "User Profile" popup in the right
{
find: ".UserPopoutUpsellSource.PROFILE_PANEL,",
replacement: {
match: /\i.default,\{userId:(\i)}\)/,
replace: "$&,$self.friendsSince({ userId: $1 })"
}
+ },
+ // User Profile Modal
+ {
+ find: ".userInfoSectionHeader,",
+ replacement: {
+ match: /(\.Messages\.USER_PROFILE_MEMBER_SINCE.+?userId:(.+?)),textClassName:(\i\.userInfoText)}\)/,
+ replace: (_, rest, userId, textClassName) => `${rest}}),$self.friendsSince({ userId: ${userId}, textClassName: ${textClassName} })`
+ }
}
],
- friendsSince: ErrorBoundary.wrap(({ userId }: { userId: string; }) => {
+ friendsSince: ErrorBoundary.wrap(({ userId, textClassName }: { userId: string; textClassName?: string; }) => {
const friendsSince = RelationshipStore.getSince(userId);
if (!friendsSince) return null;
@@ -61,7 +72,7 @@ export default definePlugin({
)}
-
+
{getCreatedAtDate(friendsSince, locale.getLocale())}