Skip to main content

catalogue_registry_entries

Function catalogue_registry_entries 

Source
pub fn catalogue_registry_entries(
    catalogue: &[ApplicationComponentDefinition],
    conversation_type: ConversationType,
) -> impl Iterator<Item = (ComponentId, ComponentMetadata)> + '_
Expand description

The registry entries a conversation takes from a backend catalogue: each valid definition selected for conversation_type (in_groups for a group, in_dms for a DM, none for a sync group) whose type and policy tags this build knows.

A snapshot an app supplies through a ConfigProvider is never validated as a whole, so only the first definition of each ID is considered, and an invalid one is skipped. Otherwise a repeated immutable ID would fail creation, and a well-known ID would replace that component’s policies.

A definition with an unknown tag is skipped, not registered: this client could not write or validate its values, and leaving the ID absent lets a client that knows the tags register it in a later commit.