diff --git a/docker/tinode/Dockerfile.build b/docker/tinode/Dockerfile.build index 249c75d..2138643 100644 --- a/docker/tinode/Dockerfile.build +++ b/docker/tinode/Dockerfile.build @@ -45,6 +45,7 @@ ENV MEDIA_HANDLER=fs ENV FS_CORS_ORIGINS='["*"]' ENV AWS_CORS_ORIGINS='["*"]' ENV SMTP_HOST_URL='http://localhost:6060' +ENV TEL_HOST_URL='http://localhost:6060' ENV TLS_ENABLED=false ENV FCM_PUSH_ENABLED=false ENV FCM_INCLUDE_ANDROID_NOTIFICATION=true @@ -68,6 +69,7 @@ WORKDIR /opt/tinode COPY docker/tinode/config.template . COPY docker/tinode/entrypoint.sh . COPY tinode-db/credentials.sh . +COPY server/templ ./templ COPY --from=build /out/tinode . COPY --from=build /out/init-db . COPY --from=build /out/apply-hotgo-tenant-db . diff --git a/server/main.go b/server/main.go index c3a3430..a4514ef 100644 --- a/server/main.go +++ b/server/main.go @@ -491,6 +491,13 @@ func main() { globals.immutableTagNS[name] = true } + if len(vconf.Required) == 0 && name != "tel" { + // Optional product phone registration uses the tel validator even + // when it is not required for an auth level. Other validators stay + // disabled when they are not explicitly required. + continue + } + var reqLevels []auth.Level for _, req := range vconf.Required { lvl := auth.ParseAuthLevel(req)