From aa6ab09ed4c5196b1e79d684ca4ffd1d8a7248d2 Mon Sep 17 00:00:00 2001 From: Corina Gum <14900841+corinagum@users.noreply.github.com> Date: Thu, 14 May 2026 12:33:43 -0700 Subject: [PATCH 1/2] Remove Experimental --- .../api/src/microsoft_teams/api/clients/reaction/client.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/api/src/microsoft_teams/api/clients/reaction/client.py b/packages/api/src/microsoft_teams/api/clients/reaction/client.py index a1a20a94..ac9d68c4 100644 --- a/packages/api/src/microsoft_teams/api/clients/reaction/client.py +++ b/packages/api/src/microsoft_teams/api/clients/reaction/client.py @@ -5,7 +5,6 @@ from typing import Optional -from microsoft_teams.common.experimental import experimental from microsoft_teams.common.http import Client from ...models.message import MessageReactionType @@ -13,14 +12,9 @@ from ..base_client import BaseClient -@experimental("ExperimentalTeamsReactions") class ReactionClient(BaseClient): """ Client for working with app message reactions for a given conversation/activity. - - .. warning:: Preview - This API is in preview and may change in the future. - Diagnostic: ExperimentalTeamsReactions """ def __init__( From dd95a791e4e0e8220812c6d13e7d0eed38487a87 Mon Sep 17 00:00:00 2001 From: Corina Gum <14900841+corinagum@users.noreply.github.com> Date: Thu, 14 May 2026 12:33:58 -0700 Subject: [PATCH 2/2] Update sample to add reaction before removing --- examples/reactions/src/main.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/examples/reactions/src/main.py b/examples/reactions/src/main.py index 957473cc..61f967da 100644 --- a/examples/reactions/src/main.py +++ b/examples/reactions/src/main.py @@ -46,19 +46,24 @@ async def handle_message(ctx: ActivityContext[MessageActivity]): return # ============================================ - # Remove Reaction + # Remove Reaction (adds first so there's something to remove) # ============================================ if text.startswith("unreact "): reaction_type = text[8:].strip() + await ctx.api.reactions.add( + conversation_id=conversation_id, + activity_id=activity_id, + reaction_type=reaction_type, + ) + await ctx.reply(f"✅ Added {reaction_type} reaction, removing in 2s...") + await asyncio.sleep(2) await ctx.api.reactions.delete( conversation_id=conversation_id, activity_id=activity_id, reaction_type=reaction_type, ) - - await ctx.reply(f"✅ Removed {reaction_type} reaction from your message!") - print(f"[REACTION] Removed '{reaction_type}' from activity {activity_id}") + print(f"[REACTION] Cycled '{reaction_type}' on activity {activity_id}") return # ============================================ @@ -69,9 +74,9 @@ async def handle_message(ctx: ActivityContext[MessageActivity]): "**Message Reactions Bot**\n\n" "**Commands:**\n" "- `react ` - Add a reaction to your message\n" - "- `unreact ` - Remove a reaction from your message\n\n" + "- `unreact ` - Add then remove a reaction (2s cycle) to demo deletion\n\n" "- `react like` - Adds a 👍 to your message\n" - "- `unreact like` - Removes the 👍 from your message" + "- `unreact like` - Adds a 👍 then removes it after 2 seconds" ) return