code: def users_changed_handler(stream):
      
      while True:
          yield from stream.get()
  
          # Get list list of current active users
          users = [
              {'username': username, 'uuid': uuid_str}
              for username, uuid_str in ws_connections.values()
          ]
  
          # Make packet with list of new users (sorted by username)
          packet = {
              'type': 'users-changed',
              'value': sorted(users, key=lambda i: i['username'])
          }
          logger.debug(packet)
          yield from fanout_message(ws_connections.keys(), packet)
docs: Sends connected client list of currently active users in the chatroom