From 4eaf6d058a891d7e501a0eac20349aa0b417f12f Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 11 May 2024 13:39:50 +0200 Subject: [PATCH] Remove obsolete ErrAnonymousNotAuthorised. --- group/group.go | 3 --- rtpconn/webclient.go | 2 -- 2 files changed, 5 deletions(-) diff --git a/group/group.go b/group/group.go index 191706a..ebcdcc5 100644 --- a/group/group.go +++ b/group/group.go @@ -40,9 +40,6 @@ func (err *NotAuthorisedError) Unwrap() error { return err.err } -var ErrAnonymousNotAuthorised = &NotAuthorisedError{ - err: errors.New("anonymous users not authorised in this group"), -} var ErrDuplicateUsername = &NotAuthorisedError{ errors.New("this username is taken"), } diff --git a/rtpconn/webclient.go b/rtpconn/webclient.go index 9a86194..3384802 100644 --- a/rtpconn/webclient.go +++ b/rtpconn/webclient.go @@ -1426,8 +1426,6 @@ func handleClientMessage(c *webClient, m clientMessage) error { var autherr *group.NotAuthorisedError if errors.Is(err, os.ErrNotExist) { s = "group does not exist" - } else if errors.Is(err, group.ErrAnonymousNotAuthorised) { - s = "please choose a username" } else if errors.Is(err, token.ErrUsernameRequired) { s = err.Error() e = "need-username"