diff --git a/draw/consumers.py b/draw/consumers.py index 31f893f..23384d6 100644 --- a/draw/consumers.py +++ b/draw/consumers.py @@ -969,6 +969,12 @@ class DrawConsumer(AsyncJsonWebsocketConsumer): self.tournament.draw.last_message = msg await self.tournament.draw.asave() + # Send notification to everyone + await self.channel_layer.group_send(f"tournament-{self.tournament.id}", + {'tid': self.tournament_id, 'type': 'draw.notify', + 'title': 'Tirage au sort du TFJM²', + 'body': "Le tirage au sort pour le second tour de la finale a commencé !"}) + # Set the first pool of the second round as the active pool pool = await Pool.objects.filter(round=self.tournament.draw.current_round, letter=1).aget() r2.current_pool = pool