Skip to content

Remove supports_threading guard from app.reply()#396

Merged
corinagum merged 1 commit into
mainfrom
cg/remove-threading-guard
Apr 20, 2026
Merged

Remove supports_threading guard from app.reply()#396
corinagum merged 1 commit into
mainfrom
cg/remove-threading-guard

Conversation

@corinagum
Copy link
Copy Markdown
Contributor

Summary

  • Remove supports_threading() guard from app.reply() 3-arg form -- always calls to_threaded_conversation_id() when message_id is provided
  • Remove supports_threading() function and THREADING_SUFFIXES constant (dead code)
  • Remove supports_threading tests
  • Update test manual example to remove conversation type guard
  • Threading support is now determined by the service, not the SDK

Why: Threading support is expanding (channels, 1:1, group chats). Maintaining an allowlist of conversation ID suffixes creates a maintenance burden and can block developers from using newly supported scopes until the SDK is updated.

Test plan

  • ruff check: all passed
  • pyright: 0 errors
  • pytest: 630 passed

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 20, 2026 20:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the SDK-side allowlist/guard for threaded replies so App.reply() consistently constructs a threaded conversation id when a message_id is provided, delegating “does this scope support threading?” to the Teams service.

Changes:

  • Remove supports_threading() and THREADING_SUFFIXES, and delete the related unit tests.
  • Update App.reply() 3-arg form to always call to_threaded_conversation_id() when message_id is provided.
  • Simplify the threading example by removing the local conversation-type guard and update its README accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/apps/tests/test_thread.py Removes supports_threading tests; keeps to_threaded_conversation_id coverage.
packages/apps/src/microsoft_teams/apps/utils/thread.py Deletes supports_threading + suffix allowlist; retains only to_threaded_conversation_id.
packages/apps/src/microsoft_teams/apps/app.py Updates App.reply() to always thread in 3-arg form and adjusts docstring/imports.
examples/threading/src/main.py Removes manual “conversation type supports threading” guard in the sample.
examples/threading/README.md Updates sample documentation to match new behavior/expectations.

Comment thread packages/apps/src/microsoft_teams/apps/app.py
@corinagum corinagum merged commit fd88c42 into main Apr 20, 2026
11 checks passed
@corinagum corinagum deleted the cg/remove-threading-guard branch April 20, 2026 21:54
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.

2 participants