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
9e0e0b76
Commit
9e0e0b76
authored
Jul 12, 2023
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
special commands added
parent
2b30260c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
en.yml
assets/strings/en.yml
+7
-0
messaging_extension_action_preview_bot.py
bots/messaging_extension_action_preview_bot.py
+18
-0
No files found.
assets/strings/en.yml
View file @
9e0e0b76
...
...
@@ -20,6 +20,10 @@ en:
cmd_portal
:
"
portal"
cmd_mars
:
"
mars"
cmd_upload
:
"
upload"
cmd_mars_auth
:
"
mars-auth"
portal_text
:
"
Open
secured
portal"
...
...
@@ -40,3 +44,6 @@ en:
text_authorize
:
"
Authorize"
text_service_acc_auth
:
"
Service
account
authorization:"
text_upload_title
:
"
Open
Upload
page"
text_upload_header
:
"
Upload
media
file"
bots/messaging_extension_action_preview_bot.py
View file @
9e0e0b76
...
...
@@ -387,6 +387,24 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
cmd_sharepoint_acc
=
i18n
.
t
(
"cmd_sharepoint_acc"
)
cmd_mars_auth
=
i18n
.
t
(
"cmd_mars_auth"
)
cmd_mars
=
i18n
.
t
(
"cmd_mars"
)
cmd_upload
=
i18n
.
t
(
"cmd_upload"
)
if
message_lower
in
[
cmd_mars
.
lower
(),
cmd_upload
.
lower
()]:
header
=
i18n
.
t
(
"text_upload_header"
)
title
=
i18n
.
t
(
"text_upload_title"
)
url
=
self
.
generate_url
(
f
"https://{AppConfig.MARS_FQDN}/"
,
turn_context
.
activity
.
conversation
.
id
)
card
=
CardHelper
.
load_assets_card
(
"link_card"
,
context
=
dict
(
title
=
title
,
url
=
url
,
header
=
header
))
attachments
=
[
CardFactory
.
adaptive_card
(
card
)]
await
turn_context
.
send_activity
(
Activity
(
type
=
ActivityTypes
.
message
,
attachments
=
attachments
)
)
return
if
message_lower
==
cmd_mars_auth
.
lower
():
header
=
i18n
.
t
(
"text_service_acc_auth"
)
title
=
i18n
.
t
(
"text_authorize"
)
...
...
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