Fix Crashing

This commit is contained in:
thororen1234 2025-02-14 21:29:40 -05:00
parent d77fd04a64
commit 0ba61b1c7a
No known key found for this signature in database

View file

@ -47,7 +47,7 @@ const userContextMenuPatch: NavContextMenuPatchCallback = (children, { user }: {
};
export function getCustomColorString(userId: string, withHash?: boolean): string | undefined {
if (!colors[userId] || !Settings.plugins.customUserColors.enabled)
if (!colors[userId] || !Settings.plugins.CustomUserColors.enabled)
return;
if (withHash)
@ -110,8 +110,7 @@ export default definePlugin({
colorIfServer(a: any): string | undefined {
const roleColor = a.author.colorString;
if (a.channel.guild_id && !settings.store.colorInServers)
return roleColor;
if (a.channel.guild_id && !settings.store.colorInServers) return roleColor;
const color = getCustomColorString(a.message.author.id, true);
return color ?? roleColor;