Fix replay chatview with new gummys (#2340)

Fix #2334
This update fixes the violation that happens when watching replays to
determin the proper user privlevel in order to generate the correct
gummy.
This commit is contained in:
woogerboy21 2017-01-06 15:28:30 -05:00 committed by GitHub
parent 847d959326
commit dbf7d7f748
7 changed files with 12 additions and 12 deletions

View file

@ -273,8 +273,10 @@ void TabRoom::processRoomSayEvent(const Event_RoomSay &event)
UserListTWI *twi = userList->getUsers().value(senderName);
UserLevelFlags userLevel;
QString userPrivLevel;
if (twi) {
userLevel = UserLevelFlags(twi->getUserInfo().user_level());
userPrivLevel = QString::fromStdString(twi->getUserInfo().privlevel());
if (settingsCache->getIgnoreUnregisteredUsers() && !userLevel.testFlag(ServerInfo_User::IsRegistered))
return;
}
@ -286,7 +288,7 @@ void TabRoom::processRoomSayEvent(const Event_RoomSay &event)
message = "[" + QString(QDateTime::fromMSecsSinceEpoch(event.time_of()).toLocalTime().toString("d MMM yyyy HH:mm:ss")) + "] " + message;
chatView->appendMessage(message, event.message_type(), senderName, userLevel, true);
chatView->appendMessage(message, event.message_type(), senderName, userLevel, userPrivLevel, true);
emit userEvent(false);
}