mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
ref: use username colour from IRC tag instead of cache
This commit is contained in:
parent
fc12a3c630
commit
8ff61c4860
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue