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
9382fc4f
Commit
9382fc4f
authored
Jan 31, 2023
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notification_id logged
parent
6a8b86f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
app.py
app.py
+3
-0
No files found.
app.py
View file @
9382fc4f
""" Bot App """
import
json
import
logging
import
sys
import
time
import
traceback
...
...
@@ -43,6 +44,7 @@ app_settings = BotFrameworkAdapterSettings(app_config.APP_ID,
ADAPTER
=
BotFrameworkAdapter
(
app_settings
)
BOT
=
TeamsMessagingExtensionsActionPreviewBot
(
app_settings
,
ADAPTER
)
TAG
=
__name__
log
=
logging
.
getLogger
()
# noinspection PyShadowingNames
...
...
@@ -154,6 +156,7 @@ async def v1_post_notification(request: Request) -> Response:
schema
=
Notification
.
get_schema
(
unknown
=
EXCLUDE
)
notification
=
schema
.
load
(
json_loads
(
request_body
,
{}))
.
to_db
()
notification_id
=
await
BOT
.
send_notification
(
notification
)
log
.
info
(
f
"notification_id: {notification_id}"
)
data
=
dict
(
notificationId
=
notification_id
)
body
=
dict
(
status
=
dict
(
message
=
"OK"
,
code
=
200
),
data
=
data
)
return
Response
(
body
=
json
.
dumps
(
body
),
status
=
HTTPStatus
.
OK
)
...
...
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