fix: use workspace for registration mail

code_spécifique_watcha
c-cal 2 years ago
parent 5d2ae5ab9e
commit 76c6a95fcf
Signed by: watcha
GPG Key ID: 87DD78E7F7A1581D
  1. 5
      synapse/push/mailer.py

@ -45,7 +45,6 @@ if TYPE_CHECKING:
from synapse.server import HomeServer
# watcha+
import urllib.parse
from base64 import b64encode
from pathlib import Path
@ -199,6 +198,8 @@ class Mailer:
default_username = urllib.parse.quote_plus(email_address)
login_url += f"/#/partner?defaultUsername={default_username}"
workspace = urllib.parse.urlparse(login_url).netloc
b64_images = {
"b64_watcha_button": self._get_b64_image("watcha_button.png"),
"b64_google_play_badge": self._get_b64_image(
@ -212,7 +213,7 @@ class Mailer:
"sender_name": sender_name,
"identifier": email_address,
"password": password,
"server": self.hs.config.server.server_name,
"workspace": workspace,
"login_url": login_url,
"is_partner": (
is_partner

Loading…
Cancel
Save