ref: use username colour from IRC tag instead of cache

This commit is contained in:
James Upjohn 2024-10-16 13:43:14 +13:00
parent fc12a3c630
commit 8ff61c4860
No known key found for this signature in database
GPG key ID: C2A35391BA777173

View file

@ -551,13 +551,11 @@ std::vector<MessagePtr> parseUserNoticeMessage(Channel *channel,
{
auto login = loginTag.value().toString();
MessageColor color = MessageColor::System;
if (auto *tc = dynamic_cast<TwitchChannel *>(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();