1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-26 17:26:22 +00:00

fix: MutualGroupDMs (#1879)

This commit is contained in:
Amia 2023-10-25 20:01:25 +02:00 committed by Luna
parent 443985d757
commit 7b4e4a6b4c

View file

@ -47,16 +47,17 @@ export default definePlugin({
patches: [ patches: [
{ {
find: ".Messages.USER_PROFILE_MODAL", // Note: the module is lazy-loaded find: ".Messages.USER_PROFILE_MODAL", // Note: the module is lazy-loaded
replacement: [ replacement: {
{ match: /(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/,
match: /(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/, replace: '($1||arguments[0].isCurrentUser)?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),'
replace: '$1?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),' }
}, },
{ {
match: /(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/, find: ".UserProfileSections.USER_INFO_CONNECTIONS:",
replace: "case \"MUTUAL_GDMS\":return $self.renderMutualGDMs($1,$2);" replacement: {
} match: /(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,
] replace: "case \"MUTUAL_GDMS\":return $self.renderMutualGDMs($1,$2);"
}
} }
], ],