From f77c6ac74e3309139c3f9b17a85f560a265a19a5 Mon Sep 17 00:00:00 2001
From: jschaul
Date: Fri, 22 Sep 2017 13:43:57 +0200
Subject: [PATCH 01/10] Fix compilation for api-bot and api-client
---
libs/api-bot/src/Network/Wire/Bot/Cache.hs | 1 +
libs/api-bot/src/Network/Wire/Bot/Monad.hs | 2 ++
libs/api-bot/stack.yaml | 1 +
libs/api-client/stack.yaml | 1 +
4 files changed, 5 insertions(+)
diff --git a/libs/api-bot/src/Network/Wire/Bot/Cache.hs b/libs/api-bot/src/Network/Wire/Bot/Cache.hs
index ad3277191e7..f37321b25c6 100644
--- a/libs/api-bot/src/Network/Wire/Bot/Cache.hs
+++ b/libs/api-bot/src/Network/Wire/Bot/Cache.hs
@@ -16,6 +16,7 @@ import Data.ByteString.Conversion
import Data.IORef
import Data.LanguageCodes
import Data.Maybe (fromMaybe)
+import Data.Misc
import Data.Monoid
import Data.Text.Encoding
import Data.Text.Lazy hiding (length, map)
diff --git a/libs/api-bot/src/Network/Wire/Bot/Monad.hs b/libs/api-bot/src/Network/Wire/Bot/Monad.hs
index bf64e046743..b85910957c0 100644
--- a/libs/api-bot/src/Network/Wire/Bot/Monad.hs
+++ b/libs/api-bot/src/Network/Wire/Bot/Monad.hs
@@ -84,6 +84,7 @@ import Data.Id
import Data.IORef
import Data.List (foldl', partition)
import Data.Maybe (fromMaybe, isNothing)
+import Data.Misc
import Data.Metrics (Metrics)
import Data.Monoid ((<>))
import Data.String (IsString)
@@ -861,6 +862,7 @@ randUser (Email loc dom) (BotTag tag) = do
, newUserInvitationCode = Nothing
, newUserLabel = Nothing
, newUserLocale = Nothing
+ , newUserTeam = Nothing
}, passw)
randMailbox :: BotNet Mailbox
diff --git a/libs/api-bot/stack.yaml b/libs/api-bot/stack.yaml
index 1a83851049e..7b1390718bf 100644
--- a/libs/api-bot/stack.yaml
+++ b/libs/api-bot/stack.yaml
@@ -20,3 +20,4 @@ extra-deps:
flags:
types-common:
protobuf: True
+ arbitrary: True
diff --git a/libs/api-client/stack.yaml b/libs/api-client/stack.yaml
index 1be86de7533..1ac57bc8023 100644
--- a/libs/api-client/stack.yaml
+++ b/libs/api-client/stack.yaml
@@ -18,3 +18,4 @@ extra-deps:
flags:
types-common:
protobuf: True
+ arbitrary: True
From e76b4323dcfd423fc0d98f06416da7b627ca1205 Mon Sep 17 00:00:00 2001
From: Jon Elverkilde
Date: Wed, 4 Oct 2017 09:10:08 +0200
Subject: [PATCH 02/10] Fix alpine builder path
---
build/alpine/Dockerfile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/build/alpine/Dockerfile b/build/alpine/Dockerfile
index 110586b3822..c08e0718811 100644
--- a/build/alpine/Dockerfile
+++ b/build/alpine/Dockerfile
@@ -8,15 +8,15 @@
FROM wire-server-builder:alpine as builder
ARG service
-COPY . /src
+COPY . /src/wire-server/
-RUN cd /src/services/${service} && make install
+RUN cd /src/wire-server/services/${service} && make install
#--- Minified stage ---
FROM wire-server-deps:alpine
ARG service
-COPY --from=builder /src/services/${service}/dist/${service} /usr/local/bin/${service}
+COPY --from=builder /src/wire-server/services/${service}/dist/${service} /usr/local/bin/${service}
# ARGs are not available at runtime, create symlink at build time
# more info: https://stackoverflow.com/questions/40902445/using-variable-interpolation-in-string-in-docker
From 9233663a3797a51ca8beefcfd9d488663b756842 Mon Sep 17 00:00:00 2001
From: jschaul
Date: Thu, 5 Oct 2017 14:24:43 +0200
Subject: [PATCH 03/10] Containers for integration,schema,etc executables
---
build/alpine/Dockerfile | 7 ++++---
services/brig/Makefile | 10 +++++++++-
services/cannon/Makefile | 9 ++++++++-
services/cargohold/Makefile | 9 ++++++++-
services/galley/Makefile | 10 +++++++++-
services/gundeck/Makefile | 10 +++++++++-
services/proxy/Makefile | 9 ++++++++-
7 files changed, 55 insertions(+), 9 deletions(-)
diff --git a/build/alpine/Dockerfile b/build/alpine/Dockerfile
index c08e0718811..f903fa2afa3 100644
--- a/build/alpine/Dockerfile
+++ b/build/alpine/Dockerfile
@@ -16,9 +16,10 @@ RUN cd /src/wire-server/services/${service} && make install
FROM wire-server-deps:alpine
ARG service
-COPY --from=builder /src/wire-server/services/${service}/dist/${service} /usr/local/bin/${service}
+ARG executable
+COPY --from=builder /src/wire-server/services/${service}/dist/${executable} /usr/bin/${exectuable}
# ARGs are not available at runtime, create symlink at build time
# more info: https://stackoverflow.com/questions/40902445/using-variable-interpolation-in-string-in-docker
-RUN ln -s /usr/local/bin/${service} /usr/local/bin/service
-ENTRYPOINT ["/usr/local/bin/service"]
+RUN ln -s /usr/bin/${executable} /usr/bin/service
+ENTRYPOINT ["/usr/bin/service"]
diff --git a/services/brig/Makefile b/services/brig/Makefile
index a096446f021..e80ca8b8c49 100644
--- a/services/brig/Makefile
+++ b/services/brig/Makefile
@@ -12,6 +12,7 @@ DEB_IT := dist/$(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
DEB_SCHEMA := dist/$(NAME)-schema_$(VERSION)+$(BUILD)_amd64.deb
DEB_INDEX := dist/$(NAME)-index_$(VERSION)+$(BUILD)_amd64.deb
KEIRETSU_ENV ?= ../.env
+EXECUTABLES := $(NAME) $(NAME)-integration $(NAME)-schema $(NAME)-index
guard-%:
@ if [ "${${*}}" = "" ]; then \
@@ -115,4 +116,11 @@ index-reset: install
.PHONY: docker
docker:
- docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
+ $(foreach executable,$(EXECUTABLES),\
+ docker build -t $(executable) \
+ -f ../../build/alpine/Dockerfile \
+ --build-arg service=$(NAME) \
+ --build-arg executable=$(executable) \
+ ../.. \
+ ;)
+
diff --git a/services/cannon/Makefile b/services/cannon/Makefile
index 95075003219..47a66d676c0 100644
--- a/services/cannon/Makefile
+++ b/services/cannon/Makefile
@@ -5,6 +5,7 @@ BUILD_NUMBER ?= 0
BUILD_LABEL ?= local
BUILD := $(BUILD_NUMBER)$(shell [ "${BUILD_LABEL}" == "" ] && echo "" || echo ".${BUILD_LABEL}")
DEB := $(NAME)_$(VERSION)+$(BUILD)_amd64.deb
+EXECUTABLES := $(NAME)
guard-%:
@ if [ "${${*}}" = "" ]; then \
@@ -59,4 +60,10 @@ integration-%:
.PHONY: docker
docker:
- docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
+ $(foreach executable,$(EXECUTABLES),\
+ docker build -t $(executable) \
+ -f ../../build/alpine/Dockerfile \
+ --build-arg service=$(NAME) \
+ --build-arg executable=$(executable) \
+ ../.. \
+ ;)
diff --git a/services/cargohold/Makefile b/services/cargohold/Makefile
index eb8875b88f0..d86d28ae21f 100644
--- a/services/cargohold/Makefile
+++ b/services/cargohold/Makefile
@@ -9,6 +9,7 @@ DEB := dist/$(NAME)_$(VERSION)+$(BUILD)_amd64.deb
DEB_IT := dist/$(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
SDIST := dist/$(NAME)-$(VERSION).tar.gz
KEIRETSU_ENV ?= ../.env
+EXECUTABLES := $(NAME) $(NAME)-integration
guard-%:
@ if [ "${${*}}" = "" ]; then \
@@ -66,4 +67,10 @@ integration: install
.PHONY: docker
docker:
- docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
+ $(foreach executable,$(EXECUTABLES),\
+ docker build -t $(executable) \
+ -f ../../build/alpine/Dockerfile \
+ --build-arg service=$(NAME) \
+ --build-arg executable=$(executable) \
+ ../.. \
+ ;)
diff --git a/services/galley/Makefile b/services/galley/Makefile
index cbdcace2f62..a329dac4a49 100644
--- a/services/galley/Makefile
+++ b/services/galley/Makefile
@@ -11,6 +11,7 @@ DEB_IT := $(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
DEB_SCHEMA := $(NAME)-schema_$(VERSION)+$(BUILD)_amd64.deb
DEB_JOURNALER := $(NAME)-journaler_$(VERSION)+$(BUILD)_amd64.deb
KEIRETSU_ENV ?= ../.env
+EXECUTABLES := $(NAME) $(NAME)-integration $(NAME)-schema $(NAME)-journaler
guard-%:
@ if [ "${${*}}" = "" ]; then \
@@ -101,4 +102,11 @@ db-migrate: install
.PHONY: docker
docker:
- docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
+ $(foreach executable,$(EXECUTABLES),\
+ docker build -t $(executable) \
+ -f ../../build/alpine/Dockerfile \
+ --build-arg service=$(NAME) \
+ --build-arg executable=$(executable) \
+ ../.. \
+ ;)
+
diff --git a/services/gundeck/Makefile b/services/gundeck/Makefile
index befef43ae2d..b597212d755 100644
--- a/services/gundeck/Makefile
+++ b/services/gundeck/Makefile
@@ -13,6 +13,7 @@ DEB_IT := $(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
DEB_SCHEMA := $(NAME)-schema_$(VERSION)+$(BUILD)_amd64.deb
SDIST := dist/$(NAME)-$(VERSION).tar.gz
KEIRETSU_ENV ?= ../.env
+EXECUTABLES := $(NAME) $(NAME)-integration $(NAME)-schema
guard-%:
@ if [ "${${*}}" = "" ]; then \
@@ -106,4 +107,11 @@ db-migrate: install
.PHONY: docker
docker:
- docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
+ $(foreach executable,$(EXECUTABLES),\
+ docker build -t $(executable) \
+ -f ../../build/alpine/Dockerfile \
+ --build-arg service=$(NAME) \
+ --build-arg executable=$(executable) \
+ ../.. \
+ ;)
+
diff --git a/services/proxy/Makefile b/services/proxy/Makefile
index b97c96482c4..de883e3fb05 100644
--- a/services/proxy/Makefile
+++ b/services/proxy/Makefile
@@ -5,6 +5,7 @@ BUILD_NUMBER ?= 0
BUILD_LABEL ?= local
BUILD := $(BUILD_NUMBER)$(shell [ "${BUILD_LABEL}" == "" ] && echo "" || echo ".${BUILD_LABEL}")
DEB := $(NAME)_$(VERSION)+$(BUILD)_amd64.deb
+EXECUTABLES := proxy
guard-%:
@ if [ "${${*}}" = "" ]; then \
@@ -49,4 +50,10 @@ $(DEB):
.PHONY: docker
docker:
- docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
+ $(foreach executable,$(EXECUTABLES),\
+ docker build -t $(executable) \
+ -f ../../build/alpine/Dockerfile \
+ --build-arg service=$(NAME) \
+ --build-arg executable=$(executable) \
+ ../.. \
+ ;)
From 2a4b35bd056a76bee95e510e9e7c134e80d6ec59 Mon Sep 17 00:00:00 2001
From: Tiago Loureiro
Date: Mon, 2 Oct 2017 15:02:16 +0200
Subject: [PATCH 04/10] Use a different email template when a user creates a
team
---
services/brig/Procfile | 2 +-
services/brig/deb/etc/sv/brig/run | 1 +
.../user/ar/email/team-activation-subject.txt | 1 +
.../user/ar/email/team-activation.html | 1 +
.../user/ar/email/team-activation.txt | 1 +
.../user/de/email/team-activation-subject.txt | 1 +
.../user/de/email/team-activation.html | 118 +++++++++++++++++
.../user/de/email/team-activation.txt | 24 ++++
.../templates/user/en/email/activation.html | 1 +
.../user/en/email/team-activation-subject.txt | 1 +
.../user/en/email/team-activation.html | 121 ++++++++++++++++++
.../user/en/email/team-activation.txt | 22 ++++
.../es-ES/email/team-activation-subject.txt | 1 +
.../user/es-ES/email/team-activation.html | 1 +
.../user/es-ES/email/team-activation.txt | 1 +
.../user/et/email/team-activation-subject.txt | 1 +
.../user/et/email/team-activation.html | 1 +
.../user/et/email/team-activation.txt | 1 +
.../user/fa/email/team-activation-subject.txt | 1 +
.../user/fa/email/team-activation.html | 1 +
.../user/fa/email/team-activation.txt | 1 +
.../user/fr/email/team-activation-subject.txt | 1 +
.../user/fr/email/team-activation.html | 1 +
.../user/fr/email/team-activation.txt | 1 +
.../user/it/email/team-activation-subject.txt | 1 +
.../user/it/email/team-activation.html | 1 +
.../user/it/email/team-activation.txt | 1 +
.../pt-BR/email/team-activation-subject.txt | 1 +
.../user/pt-BR/email/team-activation.html | 1 +
.../user/pt-BR/email/team-activation.txt | 1 +
.../user/ru/email/team-activation-subject.txt | 1 +
.../user/ru/email/team-activation.html | 1 +
.../user/ru/email/team-activation.txt | 1 +
.../sv-SE/email/team-activation-subject.txt | 1 +
.../user/sv-SE/email/team-activation.html | 1 +
.../user/sv-SE/email/team-activation.txt | 1 +
.../user/tr/email/team-activation-subject.txt | 1 +
.../user/tr/email/team-activation.html | 1 +
.../user/tr/email/team-activation.txt | 1 +
.../user/uk/email/team-activation-subject.txt | 1 +
.../user/uk/email/team-activation.html | 1 +
.../user/uk/email/team-activation.txt | 1 +
.../zh-TW/email/team-activation-subject.txt | 1 +
.../user/zh-TW/email/team-activation.html | 1 +
.../user/zh-TW/email/team-activation.txt | 1 +
services/brig/src/Brig/API.hs | 8 +-
services/brig/src/Brig/Options.hs | 6 +
services/brig/src/Brig/User/Email.hs | 44 +++++++
services/brig/src/Brig/User/Template.hs | 28 +++-
49 files changed, 406 insertions(+), 7 deletions(-)
create mode 120000 services/brig/deb/opt/brig/templates/user/ar/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/ar/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/ar/email/team-activation.txt
create mode 100644 services/brig/deb/opt/brig/templates/user/de/email/team-activation-subject.txt
create mode 100644 services/brig/deb/opt/brig/templates/user/de/email/team-activation.html
create mode 100644 services/brig/deb/opt/brig/templates/user/de/email/team-activation.txt
create mode 100644 services/brig/deb/opt/brig/templates/user/en/email/team-activation-subject.txt
create mode 100644 services/brig/deb/opt/brig/templates/user/en/email/team-activation.html
create mode 100644 services/brig/deb/opt/brig/templates/user/en/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/es-ES/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/es-ES/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/es-ES/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/et/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/et/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/et/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/fa/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/fa/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/fa/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/fr/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/fr/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/fr/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/it/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/it/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/it/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/pt-BR/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/pt-BR/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/pt-BR/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/ru/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/ru/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/ru/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/sv-SE/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/sv-SE/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/sv-SE/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/tr/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/tr/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/tr/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/uk/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/uk/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/uk/email/team-activation.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/zh-TW/email/team-activation-subject.txt
create mode 120000 services/brig/deb/opt/brig/templates/user/zh-TW/email/team-activation.html
create mode 120000 services/brig/deb/opt/brig/templates/user/zh-TW/email/team-activation.txt
diff --git a/services/brig/Procfile b/services/brig/Procfile
index d6b29710c26..411b68e50d6 100644
--- a/services/brig/Procfile
+++ b/services/brig/Procfile
@@ -1 +1 @@
-web: LOG_LEVEL=Warn ./dist/brig --host=$BRIG_WEB_HOST --port=$PORT --cassandra-host=$BRIG_CASSANDRA_HOST --cassandra-port=$BRIG_CASSANDRA_PORT --cassandra-keyspace=$BRIG_CASSANDRA_KEYSPACE --galley-host=$GALLEY_WEB_HOST --galley-port=$GALLEY_WEB_PORT --gundeck-host=$GUNDECK_WEB_HOST --gundeck-port=$GUNDECK_WEB_PORT --aws-ses-queue=$AWS_USER_SES_QUEUE --aws-internal-queue=$AWS_USER_INTERNAL_QUEUE --aws-dynamo-blacklist=$AWS_USER_BLACKLIST_TABLE --aws-dynamo-prekeys=$AWS_USER_PREKEYS_TABLE --aws-account-id=$AWS_ACCOUNT --aws-access-key-id=$AWS_ACCESS_KEY_ID --aws-secret-access-key=$AWS_SECRET_ACCESS_KEY --twilio-sid=$TWILIO_SID --twilio-token=$TWILIO_TOKEN --twilio-sender=$TWILIO_SENDER --nexmo-key=$NEXMO_KEY --nexmo-secret=$NEXMO_SECRET --nexmo-endpoint=$NEXMO_ENDPOINT --activation-url=http://$BRIG_WEB_HOST:$PORT/activate?key=\${key}\&code=\${code} --sms-activation-url=http://$BRIG_WEB_HOST:$PORT/v/\${code} --password-reset-url=http://$BRIG_WEB_HOST:$PORT/password-reset/\${key}?code=\${code} --invitation-url=http://$BRIG_WEB_HOST:$PORT/register?invitation_code=\${code} --deletion-url=http://$BRIG_WEB_HOST:$PORT/users/delete?key=\${key}\&code=\${code} --provider-activation-url=http://$BRIG_WEB_HOST:$PORT/provider/activate?key=\${key}\&code=\${code} --provider-approval-url=http://$BRIG_WEB_HOST:$PORT/provider/approve?key=\${key}\&code=\${code} --team-invitation-url=http://$BRIG_WEB_HOST:$PORT/register?team=\${team}\&team_code=\${code} --template-dir=deb/opt/brig/templates --email-sender=$EMAIL_SENDER --activation-timeout=$USER_ACTIVATION_TIMEOUT --user-connection-limit=$USER_CONNECTION_LIMIT --cookie-domain=$COOKIE_DOMAIN --provider-approval-to=$PROVIDER_APPROVAL_TO --provider-home-url=$PROVIDER_HOME_URL --zauth-provider-token-timeout=$ZAUTH_PROVIDER_TOKEN_TIMEOUT --zauth-private-keys=$ZAUTH_PRIVKEYS --zauth-public-keys=$ZAUTH_PUBKEYS --zauth-key-index=$ZAUTH_KEY_INDEX --zauth-user-token-timeout=$ZAUTH_USER_TOKEN_TIMEOUT --user-cookie-renew-age=$USER_COOKIE_RENEW_AGE --zauth-access-token-timeout=$ZAUTH_ACCESS_TOKEN_TIMEOUT --zauth-session-token-timeout=$ZAUTH_SESSION_TOKEN_TIMEOUT --cookie-insecure --user-cookie-retry-after=$USER_COOKIE_RETRY_AFTER --user-cookie-min-deviation=$USER_COOKIE_MIN_DEVIATION --user-cookie-limit=$USER_COOKIE_LIMIT --turn-servers=$TURN_SERVERS --turn-secret=$TURN_SECRET --elasticsearch-url=$BRIG_ELASTICSEARCH_URL --elasticsearch-user-index=$BRIG_ELASTICSEARCH_USER_INDEX
+web: LOG_LEVEL=Warn ./dist/brig --host=$BRIG_WEB_HOST --port=$PORT --cassandra-host=$BRIG_CASSANDRA_HOST --cassandra-port=$BRIG_CASSANDRA_PORT --cassandra-keyspace=$BRIG_CASSANDRA_KEYSPACE --galley-host=$GALLEY_WEB_HOST --galley-port=$GALLEY_WEB_PORT --gundeck-host=$GUNDECK_WEB_HOST --gundeck-port=$GUNDECK_WEB_PORT --aws-ses-queue=$AWS_USER_SES_QUEUE --aws-internal-queue=$AWS_USER_INTERNAL_QUEUE --aws-dynamo-blacklist=$AWS_USER_BLACKLIST_TABLE --aws-dynamo-prekeys=$AWS_USER_PREKEYS_TABLE --aws-account-id=$AWS_ACCOUNT --aws-access-key-id=$AWS_ACCESS_KEY_ID --aws-secret-access-key=$AWS_SECRET_ACCESS_KEY --twilio-sid=$TWILIO_SID --twilio-token=$TWILIO_TOKEN --twilio-sender=$TWILIO_SENDER --nexmo-key=$NEXMO_KEY --nexmo-secret=$NEXMO_SECRET --nexmo-endpoint=$NEXMO_ENDPOINT --activation-url=http://$BRIG_WEB_HOST:$PORT/activate?key=\${key}\&code=\${code} --team-activation-url=http://$BRIG_WEB_HOST:$PORT/activate?key=\${key}\&code=\${code} --sms-activation-url=http://$BRIG_WEB_HOST:$PORT/v/\${code} --password-reset-url=http://$BRIG_WEB_HOST:$PORT/password-reset/\${key}?code=\${code} --invitation-url=http://$BRIG_WEB_HOST:$PORT/register?invitation_code=\${code} --deletion-url=http://$BRIG_WEB_HOST:$PORT/users/delete?key=\${key}\&code=\${code} --provider-activation-url=http://$BRIG_WEB_HOST:$PORT/provider/activate?key=\${key}\&code=\${code} --provider-approval-url=http://$BRIG_WEB_HOST:$PORT/provider/approve?key=\${key}\&code=\${code} --team-invitation-url=http://$BRIG_WEB_HOST:$PORT/register?team=\${team}\&team_code=\${code} --template-dir=deb/opt/brig/templates --email-sender=$EMAIL_SENDER --activation-timeout=$USER_ACTIVATION_TIMEOUT --user-connection-limit=$USER_CONNECTION_LIMIT --cookie-domain=$COOKIE_DOMAIN --provider-approval-to=$PROVIDER_APPROVAL_TO --provider-home-url=$PROVIDER_HOME_URL --zauth-provider-token-timeout=$ZAUTH_PROVIDER_TOKEN_TIMEOUT --zauth-private-keys=$ZAUTH_PRIVKEYS --zauth-public-keys=$ZAUTH_PUBKEYS --zauth-key-index=$ZAUTH_KEY_INDEX --zauth-user-token-timeout=$ZAUTH_USER_TOKEN_TIMEOUT --user-cookie-renew-age=$USER_COOKIE_RENEW_AGE --zauth-access-token-timeout=$ZAUTH_ACCESS_TOKEN_TIMEOUT --zauth-session-token-timeout=$ZAUTH_SESSION_TOKEN_TIMEOUT --cookie-insecure --user-cookie-retry-after=$USER_COOKIE_RETRY_AFTER --user-cookie-min-deviation=$USER_COOKIE_MIN_DEVIATION --user-cookie-limit=$USER_COOKIE_LIMIT --turn-servers=$TURN_SERVERS --turn-secret=$TURN_SECRET --elasticsearch-url=$BRIG_ELASTICSEARCH_URL --elasticsearch-user-index=$BRIG_ELASTICSEARCH_USER_INDEX
diff --git a/services/brig/deb/etc/sv/brig/run b/services/brig/deb/etc/sv/brig/run
index 9558bddba0a..b9d6d4cffc3 100755
--- a/services/brig/deb/etc/sv/brig/run
+++ b/services/brig/deb/etc/sv/brig/run
@@ -62,6 +62,7 @@ exec chpst -u $USER \
--cassandra-port=${BRIG_CASSANDRA_PORT?'unset'} \
--cassandra-keyspace=${BRIG_CASSANDRA_KEYSPACE?'unset'} \
--activation-url=${BRIG_ACTIVATION_URL?'unset'} \
+ --team-activation-url=${BRIG_TEAM_ACTIVATION_URL?'unset'} \
--activation-timeout=${BRIG_ACTIVATION_TIMEOUT?'unset'} \
--sms-activation-url=${BRIG_SMS_ACTIVATION_URL?'unset'} \
--password-reset-url=${BRIG_PASSWORD_RESET_URL?'unset'} \
diff --git a/services/brig/deb/opt/brig/templates/user/ar/email/team-activation-subject.txt b/services/brig/deb/opt/brig/templates/user/ar/email/team-activation-subject.txt
new file mode 120000
index 00000000000..784e3a04e39
--- /dev/null
+++ b/services/brig/deb/opt/brig/templates/user/ar/email/team-activation-subject.txt
@@ -0,0 +1 @@
+../../en/email/team-activation-subject.txt
\ No newline at end of file
diff --git a/services/brig/deb/opt/brig/templates/user/ar/email/team-activation.html b/services/brig/deb/opt/brig/templates/user/ar/email/team-activation.html
new file mode 120000
index 00000000000..39707d4f014
--- /dev/null
+++ b/services/brig/deb/opt/brig/templates/user/ar/email/team-activation.html
@@ -0,0 +1 @@
+../../en/email/team-activation.html
\ No newline at end of file
diff --git a/services/brig/deb/opt/brig/templates/user/ar/email/team-activation.txt b/services/brig/deb/opt/brig/templates/user/ar/email/team-activation.txt
new file mode 120000
index 00000000000..731780a7a2d
--- /dev/null
+++ b/services/brig/deb/opt/brig/templates/user/ar/email/team-activation.txt
@@ -0,0 +1 @@
+../../en/email/team-activation.txt
\ No newline at end of file
diff --git a/services/brig/deb/opt/brig/templates/user/de/email/team-activation-subject.txt b/services/brig/deb/opt/brig/templates/user/de/email/team-activation-subject.txt
new file mode 100644
index 00000000000..78e3e141b80
--- /dev/null
+++ b/services/brig/deb/opt/brig/templates/user/de/email/team-activation-subject.txt
@@ -0,0 +1 @@
+Dein Wire-Benutzerkonto
diff --git a/services/brig/deb/opt/brig/templates/user/de/email/team-activation.html b/services/brig/deb/opt/brig/templates/user/de/email/team-activation.html
new file mode 100644
index 00000000000..562d8c5a4df
--- /dev/null
+++ b/services/brig/deb/opt/brig/templates/user/de/email/team-activation.html
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ wire.com
+ |
+
+
+
+
+ |
+
+ Dein neues Wire-Benutzerkonto im '${team}' Team
+
+
+ Ein Wire Benutzerkonto in einem neuen Wire Team namens '${team}' wurde mit der E-Mail-Adresse ${email} erstellt. Wir möchten gerne sicherstellen, dass du ${name} bist.
+
+
+ VERIFIZIEREN
+
+
+
+ Bitte klicke open auf "Verifizieren", um deine Identität zu bestätigen. Erst danach kannst du Wire nutzen.
+
+
+ Wenn du nicht auf den "Verifizieren"-Button klicken kannst, benutze stattdessen bitte folgenden Link:
+
+
+ ${url}
+
+
+ Wenn du kein Wire-Benutzerkonto mit dieser E-Mail-Adresse erstellt hast, klicke bitte hier.
+
+
+ |
+
+
+
+
+
+ Datenschutzrichtlinie·
+ Missbrauch melden Wire Swiss GmbH. Alle Rechte vorbehalten.
+ |
+
+
+
+
+ |
+
+
+
+
+
diff --git a/services/brig/deb/opt/brig/templates/user/de/email/team-activation.txt b/services/brig/deb/opt/brig/templates/user/de/email/team-activation.txt
new file mode 100644
index 00000000000..2e96043c88a
--- /dev/null
+++ b/services/brig/deb/opt/brig/templates/user/de/email/team-activation.txt
@@ -0,0 +1,24 @@
+Wire
+
+
+Hallo,
+
+
+Ein Wire Benutzerkonto in einem neuen Wire Team namens '${team}' wurde mit der E-Mail-Adresse ${email} erstellt. Wir möchten gerne sicherstellen, dass du ${name} bist.
+
+Bitte klicke auf den folgenden Link, um deine Identität zu bestätigen. Erst danach kannst du Wire nutzen.
+
+
+${url}
+
+Bitte antworte nicht auf diese E-Mail.
+
+Wenn du kein Wire-Benutzerkonto mit dieser E-Mail-Adresse erstellt hast, gehe bitte auf https://support.wire.com
+
+
+
+
+(c) Wire Swiss GmbH
+
+Datenschutzrichtlinie | Missbrauch melden
+
diff --git a/services/brig/deb/opt/brig/templates/user/en/email/activation.html b/services/brig/deb/opt/brig/templates/user/en/email/activation.html
index 687e6b5ce72..743b5d3083d 100644
--- a/services/brig/deb/opt/brig/templates/user/en/email/activation.html
+++ b/services/brig/deb/opt/brig/templates/user/en/email/activation.html
@@ -77,6 +77,7 @@
display: inline-block;
margin: 20px 0;
line-height: 3;
+ text-align: center;
">VERIFY
+ VERIFY
+
+
+
+ Click the button above to verify your address. You won’t be able to use Wire until you do.
+
+
+ If you can’t click on the button, use this link:
+
+
+ ${url}
+
+
+ If you didn’t create a Wire account using this email address, please
+
+ contact us
+ .
+
+
+
+
+
+
+
+ Privacy·
+ Report Misuse Wire Swiss GmbH. All Rights Reserved.
+ |
+
+
+
+
+
+
+
+