Fix PinDMs, SMYN, SilentTyping, ValidUser, PlatformIndicators (#1865)

This commit is contained in:
rini 2023-10-25 12:34:23 -03:00 committed by V
parent c5dd50ad8f
commit 9c60b38acc
6 changed files with 34 additions and 56 deletions

View file

@ -38,17 +38,10 @@ export default definePlugin({
},
{
find: "PrivateChannel.renderAvatar",
replacement: [
// props are shadowed by nested props so we have to do this
{
match: /let\{[^}]*applicationStream:\i[^}]*\}=(\i),/,
replace: "$&vencordProps=$1,"
},
{
match: /decorators:(\i\.isSystemDM\(\))\?(.+?):null/,
replace: "decorators:[...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)), $1?$2:null]"
}
]
replacement: {
match: /decorators:(\i\.isSystemDM\(\))\?(.+?):null/,
replace: "decorators:[...Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]), $1?$2:null]"
}
}
],
});

View file

@ -25,7 +25,7 @@ export default definePlugin({
authors: [Devs.TheSun],
patches: [
{
find: "UsernameDecorationTypes:",
find: '"Message Username"',
replacement: {
match: /currentUserIsPremium:.{0,70}{children:\i(?=}\))/,
replace: "$&.concat(Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0]))"