diff options
author | 2021-09-03 10:27:40 +0100 | |
---|---|---|
committer | 2021-09-03 10:27:40 +0100 | |
commit | 25edd57eaf3eecf0b449a4dabb5b5fc5d6ae7687 (patch) | |
tree | b6cffb65d46a07f59d5393a257973910d4116227 /internal/transport/derefinstance.go | |
parent | session name fix (#185) (diff) | |
parent | review changes (diff) | |
download | gotosocial-25edd57eaf3eecf0b449a4dabb5b5fc5d6ae7687.tar.xz |
Merge pull request #186 from superseriousbusiness/struct_validation
Struct validation
Diffstat (limited to 'internal/transport/derefinstance.go')
-rw-r--r-- | internal/transport/derefinstance.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/transport/derefinstance.go b/internal/transport/derefinstance.go index 3d72d7581..673881b05 100644 --- a/internal/transport/derefinstance.go +++ b/internal/transport/derefinstance.go @@ -32,6 +32,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/id" "github.com/superseriousbusiness/gotosocial/internal/util" + "github.com/superseriousbusiness/gotosocial/internal/validate" ) func (t *transport) DereferenceInstance(ctx context.Context, iri *url.URL) (*gtsmodel.Instance, error) { @@ -199,7 +200,7 @@ func dereferenceByNodeInfo(c context.Context, t *transport, iri *url.URL) (*gtsm if v, ok := i.(map[string]string); ok { // see if there's an email in the map if email, present := v["email"]; present { - if err := util.ValidateEmail(email); err == nil { + if err := validate.Email(email); err == nil { // valid email address contactEmail = email } |