Skip to content

Refactor: move Teams activity types to Handlers namespace#386

Merged
rido-min merged 4 commits intonext/corefrom
next/core-reorg-handlers
Mar 23, 2026
Merged

Refactor: move Teams activity types to Handlers namespace#386
rido-min merged 4 commits intonext/corefrom
next/core-reorg-handlers

Conversation

@rido-min
Copy link
Copy Markdown
Member

Reorganize Teams activity classes (e.g., MessageActivity, InvokeActivity, EventActivity, etc.) from the Schema namespace into the new Handlers namespace and file structure. Update all relevant usings and references throughout the codebase. No functional changes—this improves code organization and maintainability by clarifying the separation between schema definitions and activity handlers. Also includes minor clarity improvements in StreamingWriter.

One benefit of this organization for activities, is that make it clear which activities are incoming from the handlers, and which ones are outgoing in Schema.

Reorganize Teams activity classes (e.g., MessageActivity, InvokeActivity, EventActivity, etc.) from the Schema namespace into the new Handlers namespace and file structure. Update all relevant usings and references throughout the codebase. No functional changes—this improves code organization and maintainability by clarifying the separation between schema definitions and activity handlers. Also includes minor clarity improvements in StreamingWriter.
@rido-min rido-min requested a review from MehakBindra March 20, 2026 22:16
@rido-min rido-min added the CORE label Mar 20, 2026
Reorganize Teams bot schema and handler classes by moving them from Microsoft.Teams.Bot.Apps.Schema to feature-specific namespaces under Microsoft.Teams.Bot.Apps.Handlers, including MessageExtension and TaskModules. Update using statements and file locations accordingly. No functional changes; improves code organization and maintainability.
Reorganized entity-related classes (e.g., CitationEntity, MentionEntity, etc.) from Microsoft.Teams.Bot.Apps.Schema to the new Microsoft.Teams.Bot.Apps.Schema.Entities namespace. Updated all relevant using directives and imports across the codebase and tests. No functional changes; this improves code structure and maintainability.
@rido-min rido-min marked this pull request as ready for review March 23, 2026 14:51
Copy link
Copy Markdown
Collaborator

@singhk97 singhk97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor, separating incomming and outgoing activities into different namespaces makes it easier to know when to use what.

- Added SuggestedAction/SuggestedActions classes with serialization and unit tests; enabled quick reply buttons in bot messages
- MessageActivity/TeamsActivity now support SuggestedActions; builder supports WithSuggestedActions
- Added "suggested" and improved "help" handlers to demonstrate suggested actions
- Introduced WelcomeMessageMiddleware for first-turn onboarding
- "card" command now sends a TimeOffRequestCard adaptive card; added OnMessageSubmitAction handler
- Refactored ConversationUpdateHandler: clarified channel event registration, fixed event type strings, enabled member add/remove handlers
- Added LoggerExtensions for guarded logging; replaced direct logging calls
- Updated README with event trigger instructions and manifest guidance
- Removed catch-all echo handler; improved null checks and copyright headers
- Ensured collection properties are writable for serialization
@rido-min rido-min merged commit 826a160 into next/core Mar 23, 2026
6 checks passed
@rido-min rido-min deleted the next/core-reorg-handlers branch March 23, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants