ViewIcons: Fix opening unread group DMs (#4553)

This commit is contained in:
sadan 2026-08-26 20:12:20 -04:00 • committed by GitHub
parent ce4e84277e
commit 991535e776
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -248,7 +248,7 @@ export default definePlugin({
replacement: {
match: /null==\i\.icon\?.+?src:(\(0,\i\.\i\).+?\))(?=[,}])/,
// We have to check that icon is not an unread GDM in the server bar
replace: (m, iconUrl) => `${m},onClick:vcEvent=>arguments[0]?.size!=="SIZE_48"&&$self.openAvatar(${iconUrl},vcEvent)`
replace: (m, iconUrl) => `${m},onClick:vcEvent=>arguments[0]?.size!=="SIZE_40"&&$self.openAvatar(${iconUrl},vcEvent)`
}
},
// User DMs top small icon