3👍
✅
I think you need to replace this calls:
await async_to_sync(self.channel_layer.group_add)(
self.room_group_name,
self.channel_name
)
await async_to_sync(self.channel_layer.group_discard)(
self.room_group_name,
self.channel_name
)
with this just await:
await self.channel_layer.group_add(
self.room_group_name,
self.channel_name
)
await self.channel_layer.group_discard(
self.room_group_name,
self.channel_name
)
Source:stackexchange.com