mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-25 06:57:01 +02:00
private mode implementation.
This commit is contained in:
parent
f549171ded
commit
d004ddd68f
12 changed files with 160 additions and 11 deletions
|
@ -17,7 +17,7 @@ var (
|
|||
)
|
||||
|
||||
func (h *MessageHandlerCtx) controlRelease(session types.Session) error {
|
||||
if !session.Profile().CanHost {
|
||||
if !session.Profile().CanHost || session.PrivateModeEnabled() {
|
||||
return ErrIsNotAllowedToHost
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ func (h *MessageHandlerCtx) controlRelease(session types.Session) error {
|
|||
}
|
||||
|
||||
func (h *MessageHandlerCtx) controlRequest(session types.Session) error {
|
||||
if !session.Profile().CanHost {
|
||||
if !session.Profile().CanHost || session.PrivateModeEnabled() {
|
||||
return ErrIsNotAllowedToHost
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue