Set power level from userdetaildialog
Add the option to set powerlevel to userdetaildialog. This is done by making the powerleveldialog into it's own file and using that. implements network/neochat#570
This commit is contained in:
committed by
Tobias Fella
parent
e6a060c192
commit
bd4eeb405b
@@ -1075,6 +1075,12 @@ void NeoChatRoom::setHistoryVisibility(const QString &historyVisibilityRule)
|
||||
// Not emitting historyVisibilityChanged() here, since that would override the change in the UI with the *current* value, which is not the *new* value.
|
||||
}
|
||||
|
||||
int NeoChatRoom::getUserPowerLevel(const QString &userId) const
|
||||
{
|
||||
auto powerLevelEvent = getCurrentState<RoomPowerLevelsEvent>();
|
||||
return powerLevelEvent->powerLevelForUser(userId);
|
||||
}
|
||||
|
||||
void NeoChatRoom::setUserPowerLevel(const QString &userID, const int &powerLevel)
|
||||
{
|
||||
if (joinedCount() <= 1) {
|
||||
|
||||
Reference in New Issue
Block a user