Allow private chats use admin commands
This commit is contained in:
parent
e2ba9565d5
commit
b074189d31
|
@ -31,7 +31,7 @@ func (d *Dispatcher) HandleCommand(command *Command, handler commandHandler) *Di
|
||||||
if !strings.HasPrefix(u.Text(), command.String()) {
|
if !strings.HasPrefix(u.Text(), command.String()) {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
if command.IsAdminOnly && !u.IsUserAdmin() {
|
if command.IsAdminOnly && !u.IsUserAdmin() && u.ChatID() < 0 {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
upd := &UpdateCommand{
|
upd := &UpdateCommand{
|
||||||
|
|
Loading…
Reference in New Issue