From 8ff61c486082928fec21b5f03e7f7bdeddcffb68 Mon Sep 17 00:00:00 2001 From: James Upjohn Date: Wed, 16 Oct 2024 13:43:14 +1300 Subject: [PATCH] ref: use username colour from IRC tag instead of cache --- src/providers/twitch/IrcMessageHandler.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/providers/twitch/IrcMessageHandler.cpp b/src/providers/twitch/IrcMessageHandler.cpp index 3a9653782..3b8248018 100644 --- a/src/providers/twitch/IrcMessageHandler.cpp +++ b/src/providers/twitch/IrcMessageHandler.cpp @@ -551,13 +551,11 @@ std::vector parseUserNoticeMessage(Channel *channel, { auto login = loginTag.value().toString(); MessageColor color = MessageColor::System; - if (auto *tc = dynamic_cast(channel)) + if (auto colorTag = tags.find("color"); + colorTag != tags.end()) { - if (auto userColor = tc->getUserColor(login); - userColor.isValid()) - { - color = MessageColor(userColor); - } + // Blindly trust that it's a valid hex code + color = MessageColor(QColor{colorTag.value().toString()}); } auto displayName = displayNameTag.value().toString();