ensure only broadcasting to subscribed topics
This commit is contained in:
parent
d9d7df70bf
commit
a5442772fc
@ -34,7 +34,8 @@ async def channel_broadcaster(channel: WebSocketChannel, message_stream: Message
|
|||||||
Iterate over messages in the message stream and send them
|
Iterate over messages in the message stream and send them
|
||||||
"""
|
"""
|
||||||
async for message in message_stream:
|
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(
|
async def _process_consumer_request(
|
||||||
|
Loading…
Reference in New Issue
Block a user