mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-05 02:06:52 +00:00
Use french names for Matrix room aliases
This commit is contained in:
parent
2f6a1f6e56
commit
4f1f4b0783
@ -83,7 +83,7 @@ class Team(models.Model):
|
||||
Matrix.create_room(
|
||||
visibility=RoomVisibility.private,
|
||||
name=f"#équipe-{self.trigram.lower()}",
|
||||
alias=f"team-{self.trigram.lower()}",
|
||||
alias=f"equipe-{self.trigram.lower()}",
|
||||
topic=f"Discussion de l'équipe {self.name}",
|
||||
preset=RoomPreset.private_chat,
|
||||
)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user