mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-14 01:14:29 +01:00
Fix check in set-pl
This commit is contained in:
parent
0d977bc610
commit
ee516c1b75
1 changed files with 4 additions and 1 deletions
|
@ -450,7 +450,10 @@ func parseInviteMeta(meta map[string]interface{}) (jid, inviter types.JID, code
|
|||
const cmdSetPowerLevelHelp = `set-pl [user ID] <power level> - Change the power level in a portal room. Only for bridge admins.`
|
||||
|
||||
func (handler *CommandHandler) CommandSetPowerLevel(ce *CommandEvent) {
|
||||
if ce.Portal == nil {
|
||||
if !ce.User.Admin {
|
||||
ce.Reply("Only bridge admins can use `set-pl`")
|
||||
return
|
||||
} else if ce.Portal == nil {
|
||||
ce.Reply("Not a portal room")
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue