1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-04 12:52:15 +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

@ -64,6 +64,10 @@ class Registration(PolymorphicModel):
def is_admin(self):
return isinstance(self, AdminRegistration) or self.user.is_superuser
@property
def matrix_username(self):
return f"corres2math_{self.user.pk}"
def get_absolute_url(self):
return reverse_lazy("registration:user_detail", args=(self.user_id,))