Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cake-bot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleksandr Barabash
cake-bot
Commits
634d8445
Commit
634d8445
authored
Oct 27, 2022
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hello message added
parent
0b078606
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
messaging_extension_action_preview_bot.py
bots/messaging_extension_action_preview_bot.py
+15
-1
No files found.
bots/messaging_extension_action_preview_bot.py
View file @
634d8445
...
...
@@ -8,7 +8,8 @@ from urllib.parse import urlparse, parse_qsl, urlencode
from
aiohttp.web_app
import
Application
from
botbuilder.core
import
(
TurnContext
,
CardFactory
,
BotFrameworkAdapter
,
BotFrameworkAdapterSettings
)
from
botbuilder.schema
import
Activity
,
ActivityTypes
,
ConversationReference
from
botbuilder.schema
import
Activity
,
ActivityTypes
,
ConversationReference
,
\
ChannelAccount
from
botbuilder.schema.teams
import
(
TaskModuleContinueResponse
,
TaskModuleTaskInfo
,
TaskModuleResponse
,
TaskModuleRequest
)
...
...
@@ -130,6 +131,19 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
# noinspection PyProtectedMember
return
parsed_url
.
_replace
(
query
=
urlencode
(
params
))
.
geturl
()
async
def
on_members_added_activity
(
self
,
members_added
:
[
ChannelAccount
],
turn_context
:
TurnContext
):
""" Executed when user installs the bot """
await
self
.
cosmos_client
.
create_conversation_reference
(
turn_context
)
for
member
in
members_added
:
if
member
.
id
!=
turn_context
.
activity
.
recipient
.
id
:
await
turn_context
.
send_activity
(
"Hello! Thank you for installing {}.
\n
"
"Use 'help' command for more info."
.
format
(
AppConfig
.
BOT_NAME
)
)
async
def
on_conversation_update_activity
(
self
,
turn_context
:
TurnContext
):
""" On update conversation """
print
(
"activity:"
,
turn_context
.
activity
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment