1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-08-21 12:07:21 +02:00

Use french names for Matrix room aliases

This commit is contained in:
Yohann D'ANELLO
2020-10-31 22:23:02 +01:00
parent 2f6a1f6e56
commit 4f1f4b0783
2 changed files with 4 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ class CreateTeamView(LoginRequiredMixin, CreateView):
f"{user.first_name} {user.last_name}")
# Invite the user in the team Matrix room
Matrix.invite(f"#team-{form.instance.trigram.lower()}:correspondances-maths.fr",
Matrix.invite(f"#equipe-{form.instance.trigram.lower()}:correspondances-maths.fr",
f"@{user.registration.matrix_username}:correspondances-maths.fr")
return ret
@@ -111,7 +111,7 @@ class JoinTeamView(LoginRequiredMixin, FormView):
f"{user.first_name} {user.last_name}")
# Invite the user in the team Matrix room
Matrix.invite(f"#team-{form.instance.trigram.lower()}:correspondances-maths.fr",
Matrix.invite(f"#equipe-{form.instance.trigram.lower()}:correspondances-maths.fr",
f"@{user.registration.matrix_username}:correspondances-maths.fr")
return ret
@@ -312,7 +312,7 @@ class TeamLeaveView(LoginRequiredMixin, TemplateView):
request.user.registration.team = None
request.user.registration.save()
get_sympa_client().unsubscribe(request.user.email, f"equipe-{team.trigram.lower()}", False)
Matrix.kick(f"#team-{team.trigram.lower()}:correspondances-maths.fr",
Matrix.kick(f"#equipe-{team.trigram.lower()}:correspondances-maths.fr",
f"@{request.user.registration.matrix_username}:correspondances-maths.fr",
"Équipe quittée")
if team.students.count() + team.coachs.count() == 0: