Fix bots showing as webhook

This commit is contained in:
Vendicated 2022-10-12 19:42:36 +02:00
parent ebe62a1790
commit 83d480a68c
No known key found for this signature in database
GPG Key ID: EC781ADFB93EFFA3

@ -26,7 +26,7 @@ export default definePlugin({
replacement: { replacement: {
match: /return null==(.)\?null:.\.createElement\((.)\.Z/, match: /return null==(.)\?null:.\.createElement\((.)\.Z/,
replace: (orig, type, BotTag) => replace: (orig, type, BotTag) =>
`if(arguments[0].message.webhookId){${type}=${BotTag}.Z.Types.WEBHOOK}${orig}`, `if(arguments[0].message.webhookId&&arguments[0].user.isNonUserBot()){${type}=${BotTag}.Z.Types.WEBHOOK}${orig}`,
}, },
}, },
], ],