ensure only broadcasting to subscribed topics

This commit is contained in:
Timothy Pogue 2022-11-22 09:42:09 -07:00
parent d9d7df70bf
commit a5442772fc

View File

@ -34,7 +34,8 @@ async def channel_broadcaster(channel: WebSocketChannel, message_stream: Message
Iterate over messages in the message stream and send them
"""
async for message in message_stream:
await channel.send(message, timeout=True)
if channel.subscribed_to(message.get('type')):
await channel.send(message, timeout=True)
async def _process_consumer_request(