pass ServerInfo_User down the chain (#5542)

This commit is contained in:
RickyRister 2025-02-01 17:04:49 -08:00 committed by GitHub
parent 26c0cdc072
commit 0fc05e15cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 17 additions and 28 deletions

View file

@ -118,11 +118,8 @@ void TabMessage::messageSent(const Response &response)
void TabMessage::processUserMessageEvent(const Event_UserMessage &event)
{
auto userInfo = event.sender_name() == otherUserInfo->name() ? otherUserInfo : ownUserInfo;
const UserLevelFlags userLevel(userInfo->user_level());
const QString userPriv = QString::fromStdString(userInfo->privlevel());
chatView->appendMessage(QString::fromStdString(event.message()), {}, QString::fromStdString(event.sender_name()),
userLevel, userPriv, true);
chatView->appendMessage(QString::fromStdString(event.message()), {}, *userInfo, true);
if (tabSupervisor->currentIndex() != tabSupervisor->indexOf(this))
soundEngine->playSound("private_message");
if (SettingsCache::instance().getShowMessagePopup() && shouldShowSystemPopup(event))