USRBG: fix missing background in VC (#3851)

This commit is contained in:
thororen 2025-12-27 20:47:29 -05:00 committed by GitHub
parent c123efd659
commit 2fb549457b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,6 +70,14 @@ export default definePlugin({
replace: "$1.style=$self.getVoiceBackgroundStyles($1);"
}
]
},
{
find: '"VideoBackground-web"',
predicate: () => settings.store.voiceBackground,
replacement: {
match: /backgroundColor:.{0,25},\{style:(?=\i\?)/,
replace: "$&$self.userHasBackground(arguments[0]?.userId)?null:",
}
}
],
@ -84,7 +92,7 @@ export default definePlugin({
},
getVoiceBackgroundStyles({ className, participantUserId }: any) {
if (className.includes("tile_")) {
if (className.includes("tile")) {
if (this.userHasBackground(participantUserId)) {
return {
backgroundImage: `url(${this.getImageUrl(participantUserId)})`,