|
|
@ -93,15 +93,20 @@ ChatMessage::Ptr ChatMessage::createChatMessage(const QString& sender, const QSt |
|
|
|
|
|
|
|
|
|
|
|
if (colorizeName && Settings::getInstance().getEnableGroupChatsColor()) |
|
|
|
if (colorizeName && Settings::getInstance().getEnableGroupChatsColor()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QByteArray hash = QCryptographicHash::hash((sender.toUtf8()), QCryptographicHash::Md5); |
|
|
|
QByteArray hash = QCryptographicHash::hash((sender.toUtf8()), QCryptographicHash::Sha256); |
|
|
|
quint8 *data = (quint8*)hash.data(); |
|
|
|
quint8 *data = (quint8*)hash.data(); |
|
|
|
|
|
|
|
|
|
|
|
if (!authorColor[sender].isValid()) |
|
|
|
if (!authorColor[sender].isValid()) |
|
|
|
authorColor[sender] = QColor(data[0], data[1], data[2]); |
|
|
|
{ |
|
|
|
|
|
|
|
color.setHsv(data[0], data[1], data[2]); |
|
|
|
|
|
|
|
authorColor[sender] = color; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!isMe) |
|
|
|
if (!isMe) |
|
|
|
|
|
|
|
{ |
|
|
|
color = authorColor[sender]; |
|
|
|
color = authorColor[sender]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
msg->addColumn(new Text(senderText, authorFont, true, sender, |
|
|
|
msg->addColumn(new Text(senderText, authorFont, true, sender, |
|
|
|
type == ACTION ? actionColor : color), |
|
|
|
type == ACTION ? actionColor : color), |
|
|
|