Skip to content
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

feat (slack): support slack block kits and view events #545

Merged
merged 2 commits into from Dec 27, 2019

Conversation

darkbtf
Copy link
Contributor

@darkbtf darkbtf commented Nov 27, 2019

  1. add all event types used by Slack block kits and Slack modal
  2. use view.private_metadata to store channelId for bottender's session key

@darkbtf darkbtf force-pushed the slack-block-kits-and-view branch 2 times, most recently from 60be5c4 to 77b3bbd Compare November 29, 2019 03:59
@chentsulin chentsulin changed the base branch from master to release/1.1 December 18, 2019 03:00
@codecov-io
Copy link

codecov-io commented Dec 18, 2019

Codecov Report

Merging #545 into release/1.1 will decrease coverage by 0.9%.
The diff coverage is 60%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/1.1     #545      +/-   ##
===============================================
- Coverage        80.82%   79.92%   -0.91%     
===============================================
  Files               95       89       -6     
  Lines             4251     4030     -221     
  Branches          1032      965      -67     
===============================================
- Hits              3436     3221     -215     
+ Misses             779      773       -6     
  Partials            36       36
Impacted Files Coverage Δ
packages/bottender/src/slack/SlackEvent.ts 92.5% <0%> (-4.87%) ⬇️
packages/bottender/src/slack/SlackConnector.ts 92.3% <100%> (+0.15%) ⬆️
packages/bottender/src/slack/SlackContext.ts 88.73% <100%> (ø) ⬆️
packages/bottender/src/router/index.ts 88.33% <0%> (-2.21%) ⬇️
packages/bottender/src/messenger/MessengerEvent.ts 98.34% <0%> (-0.07%) ⬇️
packages/bottender/src/telegram/TelegramContext.ts 57.58% <0%> (ø) ⬆️
...es/bottender/src/session/CacheBasedSessionStore.ts 100% <0%> (ø) ⬆️
packages/bottender/src/line/LineContext.ts 72.53% <0%> (ø) ⬆️
packages/bottender/src/console/ConsoleContext.ts 100% <0%> (ø) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d5632d...9407b4c. Read the comment docs.

@darkbtf darkbtf changed the title [WIP] feat (slack): support slack block kits and view events feat (slack): support slack block kits and view events Dec 26, 2019
@darkbtf
Copy link
Contributor Author

darkbtf commented Dec 26, 2019

We need to keep channelId in private_metadata to make session key accessible
but private_metadata is a string
It's hard to append additional fields, so I make it:

{
  original: "ORIGINAL_PRIVATE_METADATA",
  channelId: "CHANNEL_ID"
}

This workaround should be specified in the documentation of chat.views.open

@chentsulin chentsulin merged commit 4318e10 into release/1.1 Dec 27, 2019
@chentsulin chentsulin deleted the slack-block-kits-and-view branch December 27, 2019 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants