diff --git a/internal/rpc/chat/login.go b/internal/rpc/chat/login.go index ba78a1587..2e5cc8471 100644 --- a/internal/rpc/chat/login.go +++ b/internal/rpc/chat/login.go @@ -367,7 +367,7 @@ func (o *chatSvr) Login(ctx context.Context, req *chat.LoginReq) (*chat.LoginRes } var verifyCodeID *uint if req.Password == "" { - id, err := o.verifyCode(ctx, o.verifyCodeJoin(req.VerifyCode, req.PhoneNumber), req.VerifyCode) + id, err := o.verifyCode(ctx, o.verifyCodeJoin(req.AreaCode, req.PhoneNumber), req.VerifyCode) if err != nil { return nil, err } diff --git a/internal/rpc/chat/password.go b/internal/rpc/chat/password.go index 99152f47a..5235e0626 100644 --- a/internal/rpc/chat/password.go +++ b/internal/rpc/chat/password.go @@ -31,7 +31,7 @@ func (o *chatSvr) ResetPassword(ctx context.Context, req *chat.ResetPasswordReq) if req.Password == "" { return nil, errs.ErrArgs.Wrap("password must be set") } - verifyCodeID, err := o.verifyCode(ctx, o.verifyCodeJoin(req.VerifyCode, req.PhoneNumber), req.VerifyCode) + verifyCodeID, err := o.verifyCode(ctx, o.verifyCodeJoin(req.AreaCode, req.PhoneNumber), req.VerifyCode) if err != nil { return nil, err }