def _get_expanded_subscription_set()

in chat-client/main.py [0:0]


def _get_expanded_subscription_set(subscribed_items, category_map):
    initial_set = set(subscribed_items)
    expanded_set = set(initial_set)  # Start with explicit items

    for category_tag, category_list in category_map.items():
        if category_tag in initial_set:
            # If the user subscribed to a category tag, add all items from that category
            expanded_set.update(category_list)

    return expanded_set