diff --git a/logic/hosts.go b/logic/hosts.go index d5a2a5f6..7b4acd1e 100644 --- a/logic/hosts.go +++ b/logic/hosts.go @@ -96,6 +96,10 @@ func CreateHost(h *models.Host) error { if (err != nil && !database.IsEmptyRecord(err)) || (err == nil) { return ErrHostExists } + err = RegisterHostWithTurn(h.ID.String(), h.HostPass) + if err != nil { + logger.Log(0, "failed to register host with turn server: ", err.Error()) + } // encrypt that password so we never see it hash, err := bcrypt.GenerateFromPassword([]byte(h.HostPass), 5) if err != nil {