feat: merge registration invite and verification input

This commit is contained in:
richjohnrambo
2026-09-16 14:29:59 +08:00
parent 370e9878ed
commit 7461216c03
8 changed files with 157 additions and 29 deletions
+20
View File
@@ -9,6 +9,26 @@ import (
"github.com/tinode/chat/server/store/types"
)
type registrationTestValidator struct{}
func (registrationTestValidator) Init(string) error { return nil }
func (registrationTestValidator) IsInitialized() bool { return true }
func (registrationTestValidator) PreCheck(value string, _ map[string]any) (string, error) {
return "tel:" + value, nil
}
func (registrationTestValidator) Request(types.TenantID, types.Uid, string, string, string, []byte) (bool, error) {
return true, nil
}
func (registrationTestValidator) ResetSecret(types.TenantID, string, string, string, []byte, map[string]any) error {
return nil
}
func (registrationTestValidator) Check(types.TenantID, types.Uid, string) (string, error) {
return "", nil
}
func (registrationTestValidator) Remove(types.TenantID, types.Uid, string) error { return nil }
func (registrationTestValidator) Delete(types.TenantID, types.Uid) error { return nil }
func (registrationTestValidator) TempAuthScheme() (string, error) { return "code", nil }
func TestResolveRegistrationAccount(t *testing.T) {
tests := []struct {
name string