From 33722a0d96036f005188b07b8b46a5ef091fe65f Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Sat, 4 Oct 2025 19:21:26 +0100 Subject: [PATCH] Improve documentation of the `BaseManager.get_participants()` method --- src/socketio/base_manager.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/socketio/base_manager.py b/src/socketio/base_manager.py index dafa60a..58706db 100644 --- a/src/socketio/base_manager.py +++ b/src/socketio/base_manager.py @@ -29,7 +29,13 @@ class BaseManager: return self.rooms.keys() def get_participants(self, namespace, room): - """Return an iterable with the active participants in a room.""" + """Return an iterable with the active participants in a room. + + Note that in a multi-server scenario this method only returns the + participants connect to the server in which the method is called. There + is currently no functionality to assemble a complete list of users across + multiple servers. + """ ns = self.rooms.get(namespace, {}) if hasattr(room, '__len__') and not isinstance(room, str): participants = ns[room[0]]._fwdm.copy() if room[0] in ns else {}