This commit is contained in:
thororen 2024-07-11 23:25:07 -04:00
parent f0dbddf1ea
commit 94339abefa
2 changed files with 5 additions and 4 deletions

View file

@ -17,7 +17,7 @@ const container = findByPropsLazy("memberSince");
const getCreatedAtDate = findByCodeLazy('month:"short",day:"numeric"');
const locale = findByPropsLazy("getLocale");
const lastSection = findByPropsLazy("lastSection");
const section = findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2);
const section = findLazy((m: any) => m.section !== void 0 && Object.values(m).length === 1) || findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2);
export default definePlugin({
name: "FriendsSince",

View file

@ -263,10 +263,11 @@ export default definePlugin({
// it's either this or extremely long lookbehind
match: /user:\i,nick:\i,/,
replace: "$&moreTags_channelId,"
}, {
match: /,botType:(\i),(?<=user:(\i).+?)/g,
},
...[/,botType:(\i\((\i)\)),/g, /,botType:(\i),(?<=user:(\i).+?)/g].map(match => ({
match,
replace: ",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"
}
})),
]
},
],