Commit 521c9a09 by Oleksandr Barabash

bot tenant filter added

parent a3f98943
......@@ -169,6 +169,11 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
async def on_message_activity(self, turn_context: TurnContext) -> None:
""" on message activity """
if turn_context.activity.conversation.tenant_id != AppConfig.TENANT_ID:
await turn_context.send_activity("Sorry, you dont have rights "
"to communicate with this bot "
"from your tenant")
return
if turn_context.activity.value is not None:
return await self.handle_submit_action(turn_context)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment