Skip to content

Commit

Permalink
FIX BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewZuo01 committed Nov 29, 2023
1 parent 4742432 commit fcde966
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/rpc/chat/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ func (o *chatSvr) RegisterUser(ctx context.Context, req *chat.RegisterUserReq) (
if (req.User.AreaCode == "" && req.User.PhoneNumber != "") || (req.User.AreaCode != "" && req.User.PhoneNumber == "") {
return nil, errs.ErrArgs.Wrap("area code or phone number error")
}
if req.User.PhoneNumber == "" && req.User.Account == "" && req.User.Email == "" {
return nil, errs.ErrArgs.Wrap("phone number, account, and email is empty")
if (req.User.PhoneNumber == "" || req.User.Account == "") && req.User.Email == "" {
return nil, errs.ErrArgs.Wrap("phone number, account, and email is empty")
}
var usedInvitationCode bool
if !isAdmin {
Expand Down

0 comments on commit fcde966

Please sign in to comment.