Don't offer banning users that are already banned

(cherry picked from commit 48d1fa27cf)
This commit is contained in:
Tobias Fella
2021-05-22 13:09:52 +02:00
parent 41993bfe24
commit 0476398f91
3 changed files with 8 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ Kirigami.OverlaySheet {
}
}
Kirigami.BasicListItem {
visible: user !== room.localUser && room.canSendState("kick") && room.containsUser(user)
visible: user !== room.localUser && room.canSendState("kick") && room.containsUser(user.id)
action: Kirigami.Action {
text: i18n("Kick this user")
@@ -116,7 +116,7 @@ Kirigami.OverlaySheet {
}
}
Kirigami.BasicListItem {
visible: user !== room.localUser && room.canSendState("ban")
visible: user !== room.localUser && room.canSendState("ban") && !room.isUserBanned(user.id)
action: Kirigami.Action {
text: i18n("Ban this user")