|
|
|
@ -115,7 +115,8 @@ export default definePlugin({
|
|
|
|
|
authors: [Devs.Ven],
|
|
|
|
|
tags: ["MentionCacheFix"],
|
|
|
|
|
|
|
|
|
|
patches: [{
|
|
|
|
|
patches: [
|
|
|
|
|
{
|
|
|
|
|
find: 'className:"mention"',
|
|
|
|
|
replacement: {
|
|
|
|
|
// mention = { react: function (data, parse, props) { if (data.userId == null) return RoleMention() else return UserMention()
|
|
|
|
@ -123,7 +124,15 @@ export default definePlugin({
|
|
|
|
|
// react: (...args) => OurWrapper(RoleMention, UserMention, ...args), originalReact: theirFunc
|
|
|
|
|
replace: "react:(...args)=>$self.renderMention($1,$2,...args),originalReact"
|
|
|
|
|
}
|
|
|
|
|
}],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
find: "unknownUserMentionPlaceholder:",
|
|
|
|
|
replacement: {
|
|
|
|
|
match: /unknownUserMentionPlaceholder:/,
|
|
|
|
|
replace: "$&false&&"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
renderMention(RoleMention, UserMention, data, parse, props) {
|
|
|
|
|
return (
|
|
|
|
|