1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-05 10:34:09 +02:00

Create a Matrix channel when a team got created

This commit is contained in:
Yohann D'ANELLO
2020-10-29 15:07:03 +01:00
parent b33723efb3
commit 6647a284f4
5 changed files with 41 additions and 18 deletions

View File

@ -1,3 +1,4 @@
import asyncio
import os
import re
@ -56,6 +57,7 @@ class Team(models.Model):
"hotline", # TODO Use a custom sympa template
f"Liste de diffusion pour contacter l'équipe {self.name} des Correspondances",
"education",
raise_error=False,
)
def delete_mailing_list(self):
@ -68,6 +70,7 @@ class Team(models.Model):
Matrix.create_room(
visibility=RoomVisibility.private,
name=f"#équipe-{self.trigram.lower()}",
alias=f"team-{self.trigram.lower()}",
topic=f"Discussion de l'équipe {self.name}",
preset=RoomPreset.private_chat,