Skip to content
Snippets Groups Projects
Commit de460f84 authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Merge branch 'hotfix/empty-token' into 'release'

return error if register doesn't have token

See merge request elixxir/notifications-bot!16
parents d1eb87d6 f5a06b42
No related branches found
No related tags found
No related merge requests found
......@@ -209,6 +209,9 @@ func (nb *Impl) RegisterForNotifications(clientToken []byte, auth *connect.Auth)
if !auth.IsAuthenticated {
return errors.New("Cannot register for notifications: client is not authenticated")
}
if string(clientToken) == "" {
return errors.New("Cannot register for notifications with empty client token")
}
// Implement this
u := &storage.User{
Id: auth.Sender.GetId(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment