Skip to content

Support sub channel identification from Activities#150

Merged
rodrigobr-msft merged 28 commits intomainfrom
users/robrandao/sub-channels
Oct 14, 2025
Merged

Support sub channel identification from Activities#150
rodrigobr-msft merged 28 commits intomainfrom
users/robrandao/sub-channels

Conversation

@rodrigobr-msft
Copy link
Contributor

@rodrigobr-msft rodrigobr-msft commented Oct 7, 2025

This pull request introduces a new ChannelId model to better represent channel identifiers (including sub-channels), improves type safety, and ensures consistency between the channel_id and related productInfo entities. It also introduces a formal enumeration for entity types and adds a dedicated ProductInfo entity. These changes enhance the clarity, maintainability, and correctness of the activity modeling code.

Channel ID and Product Info Enhancements:

  • Introduced a new ChannelId model in channel_id.py to represent channel identifiers with optional sub-channels, including custom parsing, serialization, and equality logic.
  • Updated the Activity and ConversationReference models to use the new ChannelId type instead of a plain string, including migration logic and backward compatibility handling. [1] [2] [3] [4] [5]
  • Implemented logic in Activity to synchronize the channel_id.sub_channel with the ProductInfo entity's id, ensuring data consistency during validation and serialization. [1] [2]

Entity Type Improvements:

  • Added a formal EntityTypes enumeration using strenum for well-known entity types, and refactored code to use this enum for clarity and maintainability. [1] [2] [3] [4] [5]

Product Info Entity:

  • Introduced a dedicated ProductInfo entity class to model product information within activities, and registered it in the public API. [1] [2] [3] [4] [5]

Dependency Update:

  • Added strenum as a dependency to support the new EntityTypes enumeration.

Public API Updates:

  • Updated __init__.py files to export the new ChannelId, EntityTypes, and ProductInfo classes, making them available for external use. [1] [2] [3] [4] [5] [6]

@rodrigobr-msft rodrigobr-msft marked this pull request as ready for review October 8, 2025 22:47
@rodrigobr-msft rodrigobr-msft marked this pull request as draft October 10, 2025 17:33
@cleemullins cleemullins self-requested a review October 13, 2025 17:12
@rodrigobr-msft rodrigobr-msft marked this pull request as ready for review October 13, 2025 18:22
@rodrigobr-msft rodrigobr-msft merged commit c53ea26 into main Oct 14, 2025
8 checks passed
@rodrigobr-msft rodrigobr-msft deleted the users/robrandao/sub-channels branch October 14, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce ProductInfo Node to entities to identify the internal channel / product of a channelID

3 participants