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
052ee6ba
Commit
052ee6ba
authored
May 22, 2023
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manifest updated, sharepoint command added
parent
576ad270
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
en.yml
assets/strings/en.yml
+2
-0
messaging_extension_action_preview_bot.py
bots/messaging_extension_action_preview_bot.py
+18
-0
config.py
config.py
+1
-0
teams_app_generator.py
utils/teams_app_generator.py
+4
-2
No files found.
assets/strings/en.yml
View file @
052ee6ba
...
@@ -19,6 +19,8 @@ en:
...
@@ -19,6 +19,8 @@ en:
cmd_portal
:
portal
cmd_portal
:
portal
cmd_sharepoint_acc
:
sharepoint
portal_text
:
Open secured portal
portal_text
:
Open secured portal
portal_button_text
:
Open secured portal
portal_button_text
:
Open secured portal
...
...
bots/messaging_extension_action_preview_bot.py
View file @
052ee6ba
...
@@ -384,6 +384,24 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
...
@@ -384,6 +384,24 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
cmd_help
=
i18n
.
t
(
"cmd_help"
)
cmd_help
=
i18n
.
t
(
"cmd_help"
)
cmd_portal
=
i18n
.
t
(
"cmd_portal"
)
cmd_portal
=
i18n
.
t
(
"cmd_portal"
)
cmd_sharepoint_acc
=
i18n
.
t
(
"cmd_sharepoint_acc"
)
if
message_lower
==
cmd_sharepoint_acc
.
lower
():
# card = CardHelper.load_assets_card("default_card")
# attachments = [CardFactory.adaptive_card(card)]
# await turn_context.send_activity(
# Activity(type=ActivityTypes.message, attachments=attachments)
# )
# return
link
=
"https://fake.s1z.info/test.html"
task_info
=
TaskModuleTaskInfo
(
title
=
TaskModuleConfig
.
TITLE
,
width
=
TaskModuleConfig
.
WIDTH
,
height
=
TaskModuleConfig
.
HEIGHT
,
url
=
link
,
fallback_url
=
link
)
return
TaskModuleResponse
(
task
=
TaskModuleContinueResponse
(
value
=
task_info
)
)
if
message_lower
==
cmd_help
.
lower
():
if
message_lower
==
cmd_help
.
lower
():
tenant_id
=
turn_context
.
activity
.
conversation
.
tenant_id
tenant_id
=
turn_context
.
activity
.
conversation
.
tenant_id
...
...
config.py
View file @
052ee6ba
...
@@ -49,6 +49,7 @@ class TeamsAppConfig:
...
@@ -49,6 +49,7 @@ class TeamsAppConfig:
class
TaskModuleConfig
:
class
TaskModuleConfig
:
""" Task Module config """
""" Task Module config """
MARS
=
os
.
environ
.
get
(
"MARS_DOMAIN"
,
"example.com"
)
TITLE
=
os
.
environ
.
get
(
"TASK_MODULE_TITLE"
,
TITLE
=
os
.
environ
.
get
(
"TASK_MODULE_TITLE"
,
"Example portal"
)
"Example portal"
)
URL
=
os
.
environ
.
get
(
"TASK_MODULE_URL"
,
URL
=
os
.
environ
.
get
(
"TASK_MODULE_URL"
,
...
...
utils/teams_app_generator.py
View file @
052ee6ba
...
@@ -92,7 +92,7 @@ class TeamsAppGenerator:
...
@@ -92,7 +92,7 @@ class TeamsAppGenerator:
manifest
.
update
(
dict
(
description
=
details
))
manifest
.
update
(
dict
(
description
=
details
))
# Bot
# Bot
bot
=
dict
(
botId
=
AppConfig
.
APP
_ID
,
bot
=
dict
(
botId
=
AppConfig
.
CLIENT
_ID
,
scopes
=
[
"personal"
,
"team"
,
"groupchat"
],
scopes
=
[
"personal"
,
"team"
,
"groupchat"
],
isNotificationOnly
=
False
,
isNotificationOnly
=
False
,
supportsCalling
=
False
,
supportsCalling
=
False
,
...
@@ -100,7 +100,9 @@ class TeamsAppGenerator:
...
@@ -100,7 +100,9 @@ class TeamsAppGenerator:
supportsFiles
=
False
)
supportsFiles
=
False
)
manifest
.
update
(
dict
(
bots
=
[
bot
,
]))
manifest
.
update
(
dict
(
bots
=
[
bot
,
]))
# WebAppInfo
# WebAppInfo
web_app_info
=
dict
(
id
=
AppConfig
.
CLIENT_ID
,
resource
=
""
)
web_app_info
=
dict
(
id
=
AppConfig
.
CLIENT_ID
,
resource
=
f
"api://{TaskModuleConfig.MARS}/"
f
"botid-{AppConfig.CLIENT_ID}"
)
manifest
.
update
(
dict
(
webApplicationInfo
=
web_app_info
))
manifest
.
update
(
dict
(
webApplicationInfo
=
web_app_info
))
# Valid domains
# Valid domains
...
...
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