-
Notifications
You must be signed in to change notification settings - Fork 297
Closed
Labels
bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.
Description
Version
botbuilder-core 4.14.6
botbuilder-integration-aiohttp 4.14.6
botbuilder-schema 4.14.6
Describe the bug
I am unable to send typing indicators with the ShowTypingMiddleware
middleware, turn_context.send_activity
, and
turn_context.send_activities
.
To Reproduce
Create a bot
cfg = DefaultConfig()
adapter = CloudAdapter(ConfigurationBotFrameworkAuthentication(cfg))
bot = Bot()
define on_message_activity
From documentation
async def on_message_activity(self, turn_context: TurnContext): # pylint: disable=unused-argument
if turn_context.activity.text == "wait":
return await turn_context.send_activities([
Activity(
type=ActivityTypes.typing
),
Activity(
type="delay",
value=3000
),
Activity(
type=ActivityTypes.message,
text="Finished Typing"
)
])
else:
return await turn_context.send_activity(
f"You said {turn_context.activity.text}. Say 'wait' to watch me type."
)
Publish in azure, set up MS Teams channel.
send 'wait' via Microsoft Teams
stacktrace:
Traceback (most recent call last):
File "path-to-virtual-env/lib/python3.10/site-packages/botbuilder/core/bot_adapter.py", line 174, in run_pipeline
return await self._middleware.receive_activity_with_status(
File "path-to-virtual-env/lib/python3.10/site-packages/botbuilder/core/middleware_set.py", line 69, in receive_activity_with_status
return await self.receive_activity_internal(context, callback)
File "path-to-virtual-env/lib/python3.10/site-packages/botbuilder/core/middleware_set.py", line 79, in receive_activity_internal
return await callback(context)
File "path-to-virtual-env/lib/python3.10/site-packages/botbuilder/core/activity_handler.py", line 70, in on_turn
await self.on_message_activity(turn_context)
File "/home/josh/ctrlstack/babelfish/askbot/microsoft-teams/src/bot.py", line 78, in on_message_activity
return await turn_context.send_activities([
File "path-to-virtual-env/lib/python3.10/site-packages/botbuilder/core/turn_context.py", line 225, in send_activities
return await self._emit(self._on_send_activities, output, logic())
File "path-to-virtual-env/lib/python3.10/site-packages/botbuilder/core/turn_context.py", line 303, in _emit
return await logic
File "path-to-virtual-env/lib/python3.10/site-packages/botbuilder/core/turn_context.py", line 220, in logic
responses = await self.adapter.send_activities(self, output)
File "path-to-virtual-env/lib/python3.10/site-packages/botbuilder/core/cloud_adapter_base.py", line 103, in send_activities
response = response or ResourceResponse(activity.id or "")
Expected behavior
the typing indicator for 3 seconds.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.