Skip to content

Commit 7d51cb7

Browse files
Stop hardcoding agdsn.me
1 parent d259efb commit 7d51cb7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

sipa/blueprints/usersuite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def subscribe():
190190

191191
email = current_user.mail.raw_value
192192
if email == "":
193-
email = f"{current_user.login.raw_value}@agdsn.me"
193+
email = f"{current_user.login.raw_value}@{current_user.datasource.mail_server}"
194194

195195
result = subscribe_to_status_page(
196196
current_app.config['STATUS_PAGE_API_SUBSCRIBE_ENDPOINT'],

sipa/forms.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,15 @@ class ChangeMailForm(FlaskForm):
238238
validators=[DataRequired(lazy_gettext("Passwort nicht angegeben!"))])
239239
email = EmailField(label=lazy_gettext("E-Mail-Adresse"))
240240
forwarded = BooleanField(
241-
label=LocalProxy(lambda:
242-
lazy_gettext("Mails für mein AG DSN E-Mail-Konto ({agdsn_email}) an private "
243-
"E-Mail-Adresse weiterleiten")
244-
.format(agdsn_email=f'{current_user.login.value}@agdsn.me')))
241+
label=LocalProxy(
242+
lambda: lazy_gettext(
243+
"Mails für mein AG DSN E-Mail-Konto ({agdsn_email}) an private "
244+
"E-Mail-Adresse weiterleiten"
245+
).format(
246+
agdsn_email=f"{current_user.login.value}@{current_user.datasource.mail_server}"
247+
)
248+
)
249+
)
245250

246251

247252
def require_unicast_mac(form, field):

0 commit comments

Comments
 (0)