Find all users(reply_channels) added in Group (Django channels)
Asked Answered
B

1

5

I am using Django channels Group to build a chat system and want to fetch all the users in chat room.

Group provide these methods :

  • Group("group_name").add(message.reply_channel)
  • Group("group_name").discard(message.reply_channel)
  • Group("group_name").send({"text": "My group message",})

But there is nothing like that I can find all users(reply_channel) in Group.

Thanks

Barricade answered 15/7, 2016 at 15:18 Comment(0)
S
0

Django Channels have purposely avoided the ability to determine all the users, mainly due to scalability concerns. Read this

However, there is this package called Django Channels Presence, which allows you to determine the users currently in a room, and they use a different mechanism so that it scales differently compared to Django Channels.

Skaw answered 2/2, 2018 at 21:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.