-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add org app support to bolt #521
Conversation
Codecov Report
@@ Coverage Diff @@
## main #521 +/- ##
==========================================
- Coverage 84.41% 79.67% -4.75%
==========================================
Files 8 8
Lines 693 738 +45
Branches 206 238 +32
==========================================
+ Hits 585 588 +3
- Misses 71 107 +36
- Partials 37 43 +6
Continue to review full report at Codecov.
|
@@ -237,6 +237,14 @@ export interface BlockAction<ElementAction extends BasicElementAction = BlockEle | |||
|
|||
// this appears in the block_suggestions schema, but we're not sure when its present or what its type would be | |||
app_unfurl?: any; | |||
|
|||
// exists for enterprise installs | |||
is_enterprise_install?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that button
gets is_enterprise_install
& enterprise: {id: '', name: ''}
. Not sure if we should confirm the payloads for the other block elements in an enterprise (&| org install) world.
ada1e73
to
75e7b24
Compare
7231bf4
to
91163fe
Compare
a1706de
to
a49290c
Compare
5bd846c
to
9573dfc
Compare
dab021f
to
136f28d
Compare
@@ -209,7 +209,7 @@ export interface BlockAction<ElementAction extends BasicElementAction = BlockEle | |||
domain: string; | |||
enterprise_id?: string; // undocumented | |||
enterprise_name?: string; // undocumented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify if enterprise_id
& enterpise_name
are still arriving in this team
object
64189c4
to
21e70d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I did not detect anything to change so far.
src/App.ts
Outdated
} | ||
} | ||
if (pool !== undefined) { | ||
// Question: should teamId from source or authResult be passed in via clientOptionsCopy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the case of enterprise_install, yes, I think so. We can set the default team_id to the client instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to update this to use the teamID
from authorizeResult
first if it exists, if not use the teamId from source
source = { | ||
teamId: | ||
type === IncomingEventType.Event || type === IncomingEventType.Command | ||
? ((body as (SlackEventMiddlewareArgs | SlackCommandMiddlewareArgs)['body']).team_id as string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just in case, we need to update the logic for SlackEventMiddlewareArgs - #687
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! I've gone ahead and added that fix right into this PR as I'm planning on releasing this today/tomorrow.
…ent type payloads
a48a182
to
8a14745
Compare
Summary
Added Org App support
Requirements (place an
x
in each[ ]
)