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
d6ee0c83
Commit
d6ee0c83
authored
Sep 22, 2023
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unquote_plus added to handle_mars_report
parent
d00fc2a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
messaging_extension_action_preview_bot.py
bots/messaging_extension_action_preview_bot.py
+11
-7
No files found.
bots/messaging_extension_action_preview_bot.py
View file @
d6ee0c83
...
@@ -7,6 +7,7 @@ import traceback
...
@@ -7,6 +7,7 @@ import traceback
import
uuid
import
uuid
from
asyncio
import
Future
from
asyncio
import
Future
from
typing
import
Optional
from
typing
import
Optional
from
urllib
import
parse
from
urllib.parse
import
urlparse
,
parse_qsl
,
urlencode
from
urllib.parse
import
urlparse
,
parse_qsl
,
urlencode
import
aiohttp
import
aiohttp
...
@@ -116,7 +117,7 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
...
@@ -116,7 +117,7 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
logger
.
info
(
"handle_mars_report"
)
logger
.
info
(
"handle_mars_report"
)
# todo(s1z): Make this secure and not such ugly
# todo(s1z): Make this secure and not such ugly
stripped_channel_id
=
channel_id
.
split
(
";"
)[
0
]
stripped_channel_id
=
parse
.
unquote_plus
(
channel_id
)
.
split
(
";"
)[
0
]
reference
=
await
self
.
cosmos_client
.
get_conversation
(
reference
=
await
self
.
cosmos_client
.
get_conversation
(
stripped_channel_id
,
AppConfig
.
TENANT_ID
stripped_channel_id
,
AppConfig
.
TENANT_ID
...
@@ -141,13 +142,16 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
...
@@ -141,13 +142,16 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
except
Exception
:
except
Exception
:
result
=
traceback
.
format_exc
()
result
=
traceback
.
format_exc
()
# send mail notifications!
try
:
await
turn_context
.
send_activity
(
# send mail notifications!
f
"the team aad_object_id: {result}"
await
turn_context
.
send_activity
(
)
f
"the team aad_object_id: {result}"
)
except
Exception
:
raise
await
self
.
adapter
.
continue_conversation
(
reference
,
callback
,
return
await
self
.
adapter
.
continue_conversation
(
reference
,
callback
,
self
.
settings
.
app_id
)
self
.
settings
.
app_id
)
def
send_message
(
self
,
pa_message
:
PAMessage
)
->
Future
[
ResourceResponse
]:
def
send_message
(
self
,
pa_message
:
PAMessage
)
->
Future
[
ResourceResponse
]:
""" Send message as a bot """
""" Send message as a bot """
...
...
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