mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-05 02:06:52 +00:00
Add #flood
This commit is contained in:
parent
2e0028c063
commit
ece1e800ab
@ -56,9 +56,20 @@ class Command(BaseCommand):
|
|||||||
preset=RoomPreset.public_chat,
|
preset=RoomPreset.public_chat,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not async_to_sync(Matrix.resolve_room_alias)("#flood:correspondances-maths.fr"):
|
||||||
|
Matrix.create_room(
|
||||||
|
visibility=RoomVisibility.public,
|
||||||
|
alias="flood",
|
||||||
|
name="Flood",
|
||||||
|
topic="Discutez de tout et de rien !",
|
||||||
|
federate=False,
|
||||||
|
preset=RoomPreset.public_chat,
|
||||||
|
)
|
||||||
|
|
||||||
Matrix.set_room_avatar("#annonces:correspondances-maths.fr", avatar_uri)
|
Matrix.set_room_avatar("#annonces:correspondances-maths.fr", avatar_uri)
|
||||||
Matrix.set_room_avatar("#faq:correspondances-maths.fr", avatar_uri)
|
Matrix.set_room_avatar("#faq:correspondances-maths.fr", avatar_uri)
|
||||||
Matrix.set_room_avatar("#je-cherche-une-equipe:correspondances-maths.fr", avatar_uri)
|
Matrix.set_room_avatar("#je-cherche-une-equipe:correspondances-maths.fr", avatar_uri)
|
||||||
|
Matrix.set_room_avatar("#flood:correspondances-maths.fr", avatar_uri)
|
||||||
|
|
||||||
Matrix.set_room_power_level_event("#annonces:correspondances-maths.fr", "events_default", 50)
|
Matrix.set_room_power_level_event("#annonces:correspondances-maths.fr", "events_default", 50)
|
||||||
|
|
||||||
@ -67,9 +78,12 @@ class Command(BaseCommand):
|
|||||||
Matrix.invite("#faq:correspondances-maths.fr", f"@{r.matrix_username}:correspondances-maths.fr")
|
Matrix.invite("#faq:correspondances-maths.fr", f"@{r.matrix_username}:correspondances-maths.fr")
|
||||||
Matrix.invite("#je-cherche-une-equipe:correspondances-maths.fr",
|
Matrix.invite("#je-cherche-une-equipe:correspondances-maths.fr",
|
||||||
f"@{r.matrix_username}:correspondances-maths.fr")
|
f"@{r.matrix_username}:correspondances-maths.fr")
|
||||||
|
Matrix.invite("#flood:correspondances-maths.fr", f"@{r.matrix_username}:correspondances-maths.fr")
|
||||||
|
|
||||||
for admin in AdminRegistration.objects.all():
|
for admin in AdminRegistration.objects.all():
|
||||||
Matrix.set_room_power_level("#annonces:correspondances-maths.fr",
|
Matrix.set_room_power_level("#annonces:correspondances-maths.fr",
|
||||||
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
||||||
Matrix.set_room_power_level("#faq:correspondances-maths.fr",
|
Matrix.set_room_power_level("#faq:correspondances-maths.fr",
|
||||||
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
||||||
|
Matrix.set_room_power_level("#flood:correspondances-maths.fr",
|
||||||
|
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
||||||
|
@ -50,3 +50,4 @@ def invite_to_public_rooms(instance: Registration, created: bool, **_):
|
|||||||
Matrix.invite("#faq:correspondances-maths.fr", f"@{instance.matrix_username}:correspondances-maths.fr")
|
Matrix.invite("#faq:correspondances-maths.fr", f"@{instance.matrix_username}:correspondances-maths.fr")
|
||||||
Matrix.invite("#je-cherche-une-equip:correspondances-maths.fr",
|
Matrix.invite("#je-cherche-une-equip:correspondances-maths.fr",
|
||||||
f"@{instance.matrix_username}:correspondances-maths.fr")
|
f"@{instance.matrix_username}:correspondances-maths.fr")
|
||||||
|
Matrix.invite("#flood:correspondances-maths.fr", f"@{instance.matrix_username}:correspondances-maths.fr")
|
||||||
|
Loading…
Reference in New Issue
Block a user