From 1387f56f35664537f481c076fc58dd7d20aa89bc Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Sun, 2 Dec 2018 07:39:53 +0100 Subject: [PATCH] Fix bug when creating new group chan --- sam/service/channel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sam/service/channel.go b/sam/service/channel.go index f9d4a4bd2..47119b6c8 100644 --- a/sam/service/channel.go +++ b/sam/service/channel.go @@ -213,7 +213,7 @@ func (svc *channel) Create(in *types.Channel) (out *types.Channel, err error) { } else if out != nil && out.CanObserve { // Group already exists so let's just return it return nil - } else if !out.CanObserve { + } else if out != nil && !out.CanObserve { return errors.New("Not allowed to create this channel due to permission settings") } }