Update ShowBadgesInChat.plugin.js

This commit is contained in:
Mirco Wittrien 2023-11-04 11:37:35 +01:00
parent 2eb189049a
commit 4f527e87ac
1 changed files with 1 additions and 1 deletions

View File

@ -392,7 +392,7 @@ module.exports = (_ => {
let username = BDFDB.ReactUtils.findChild(e.instance.props.username, {filter: n => n && n.props && n.props.decorations});
if (!username) return;
const author = e.instance.props.userOverride || e.instance.props.message.author;
let index = e.instance.props.cozy ? 0 : 1;
let index = e.instance.props.compact ? 1 : 0;
if (!BDFDB.ArrayUtils.is(username.props.decorations[index])) username.props.decorations[index] = [username.props.decorations[index]].filter(n => n);
this.injectBadges(username.props.decorations[index], author, (BDFDB.LibraryStores.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id, "chat");
}